29 setembro, 2009

Xpage - @DbColumn

Sintaxe:

@DbColumn(@DbName(),"view",numeroColuna);

No lugar do @DbName, pode especificar o nome de outra base, caso não queira da base corrente.

16 setembro, 2009

A História do 404



Antes do início dos tempos, quando a Internet ainda vivia somente nas
shells (terminais de comandos em texto) do Unix e do protocolo Gopher
(navegação sem gráficos, apenas textos); uma época em que mouse era
apenas um animal de esgotos e laboratórios e monitor "verde sobre
preto" era um luxo, um grupo de jovens cientistas no CERN (Laboratório
Europeu para Partículas Físicas - Suíça) começavam a trabalhar no que
viria a ser a grande revolução na mídia que o Homem jamais havia
testemunhado: a World Wide Web (Grande Rede Mundial), que mais tarde
viria a ser conhecida como WWW, ou simplesmente "a Rede". Seu
objetivo: criar uma infra-estrutura de base de dados capaz de oferecer
dados em vários formatos simultaneamente: a multimídia. O objetivo
final era claramente criar um protocolo que combinasse o texto com as
imagens e os apresentasse como um só documento, e ainda capaz de criar
ligações (links) para outros documentos e assim por diante: o
hipertexto.

Devido a estas mentes brilhantes serem relutantes em revelar seu
progresso ao mundo antes da conclusão dos trabalhos, eles começaram a
desenvolver seu protocolo em um ambiente fechado: a rede interna do
CERN. Milhares de horas/homem foram gastas no que mais tarde se
tornaria o padrão world-wide para documentos multimídia. Usando o
layout físico da rede e dos edifícios do CERN como uma metáfora para
"o mundo real" eles situaram funções diferentes do protocolo em
escritórios diferentes dentro do CERN.

Em um escritório no quarto andar (sala 404), eles colocaram a base de
dados central da World Wide Web: todo pedido para um arquivo era
encaminhado a esse escritório, onde duas ou três pessoas localizariam
manualmente os arquivos pedidos e os transferiam, pela rede, à pessoa
que fez as requisições.

Quando a base de dados começou a crescer, as pessoas no CERN
perceberam que podiam acessar arquivos extras, não somente os que
pertenciam aos seus papéis de pesquisas científicas. Então não somente
o número de pedidos cresceu, mas também o número de pedidos que não
poderiam ser cumpridos, geralmente porque a pessoa que pediu um
arquivo digitou o endereço errado para esse arquivo. Estes pedidos
defeituosos foram logo respondidos com uma mensagem padrão: "Room 404:
file not found", ou seja, "Sala 404: arquivo não encontrado".

Mais tarde, quando estes processos foram automatizados e as pessoas
podiam acessar diretamente a base de dados, os identificadores (ID)
para mensagens de erro permaneceram ligados à posição física onde o
processo ocorreu: "404: arquivo não encontrado".

Os números das salas permaneceram nos códigos de erro na liberação
oficial do HTTP (Hyper Text Transfer Protocol - Protocolo para
Transferência de Hiper Texto), quando a Web deixou o CERN para
conquistar o mundo, e ainda são mostrados quando um navegador faz um
pedido defeituoso a um servidor de internet. Em memória aos heróicos
garotos e garotas que vararam a madrugada durante todos aqueles meses,
naquele escritório pequeno e quente no CERN, a Sala 404 é preservada
como "um lugar na Web". Nenhuma das outras salas são usadas atualmente
para a Web. A Sala 404 é o único e verdadeiro momento para o início da
Web, um tributo a um lugar no passado, onde o futuro foi moldado.

Pastas abrindo mais rápido

Pastas abrindo muito rápido:
Iniciar > Executar > digite: system.ini

Encontre a chave [386nh]coloque o cursor na frente da chave, dê enter, abrirá uma linha, nesta linha digite:

conservativeswapfileusage=1

Menu Iniciar mais rápido

Para o menu iniciar no Windows XP ficar mais rápido acesse:

Executar regedit > HKEY_CURRENT_USER > Control Panel > Desktop

Selecione MenuShowDelay  na lista a direita, edite o valor para 0 (zero), o default o 400.

Temas de outras regiões - Windows 7

  • Abra o “Executar” (WinKey + R);
  • Digite %:\Windows\Globalization\MCT. Sendo que % é a partição onde seu Windows foi instalado, em 99% dos casos é em C;
  • Dê Enter e esta janela irá abrir:
  • Escolha a pasta que contenha o tema reginal que você quer, aplique-o e pronto! :)

15 setembro, 2009

Programação para iniciantes

Site com dirversos cursos passo a passo para quem quer começar programação.
Material totalmente em inglês.

http://www.w3schools.com/

Campos ocultos - Notes

Lista de campos ocultos do Notes. Os campos já existem, é só chamar o valor. Esses nomes são palavras reservadas.

Lista extensa mas vale a pena conferir.



$FIELDS IN DOMINO DOCUMENTED



$AssistMail
Indicates that a mail memo was sent by a background agent, rather than through the regular client UI.

$UpdatedBy
List of previous editors. Does not add new editor if same as last editor, but does if same as any other prior editor. Not changable because it's maintained by hard-coded elements of API. Only recorded on documents which have some type of Author control. Open edit documents don't track editors.

$KeepPrivate
Creates the "Prevent copying/forward/printing" on any Notes document if set to "1". Note that this is not a security feature, since a user can copy the document to a local database, then reset the $KeepPrivate field through an agent.

$Revisions
Time/Date list history of all changes to a document. If you examine the Sequence Number attribute on any field, you can find that member of the $Revisions field, and determine the time of last edit for the field. This is the basis for the Notes field-level replication model, and it's one of the most ingenious solutions I've ever seen.

$Signature
Container for private-key encrypted digest of signable fields on the document. This is what Notes uses to verify an electronic signature. If you remove the $Signature field on a signed document, Notes will report a corrupted signature. If you attempt to modify it in any way other than through the NotesDocument.Sign method, you'd better know RSA better than Ron himself!

$Fonts
Not entirely sure about the implementation on this one, but it's a container for TrueType font information in rich text fields. If you create a formatted memo, then blow away this field, you'll see reversions to the internal font types for Notes: Helv, TmsRmn, and Courier. Nasty!

$File
Object pointer for file and OLE attachments

$VersionOpt
Control field for the "save changes as new document" flag on a form. Basically, no matter what you've set on the form, changing this attribute in the document will create the various form effects associated with the flag.

$REF
UNID of parent document in parent/child relationship Notes documents. Rendering a Computed for Display text field on a document with this formula will show a doclink to the parent. You can modify this value, but you'll usually have a hardtime re-aligning the "Response Reference List" flag. You can also insert a list, but unfortunately, that doesn't give the document multiple parents. The NotesDocument.MakeResponse method sets the $Ref

$$ViewBody
Controller for view renderings on Browser clients.

Here's a few others...

$ConflictAction
Set to "1", allows automatic merging of replication conflicts

$SealData
Container for encrypted field data in a document

$Moods
Mood stamp flag for Notes mail

$$HHFlags - When you deselect the "Print header and footer on first page" checkbox in the properties for the database, each document created from then on contains a $HHFlags field with a value of "1". This field tells Notes not to print the header and/or footer on the first page.

Any documents created while the checkbox is enabled do not contain the $HHFLags field.
Any documents created while the checkbox is not enabled do contain the $HHFLags field

$PaperColor - The background colour changes for numeric values of $PaperColor between 1 and 239.

$Conflict - Determines if there is a save conflict with the document.

$V2AttachmentOptions. This is a special field that tells Notes not to display attachment icons on the web and in the notes client. Give this field a value of "0" (zero) to not display attachment icons. For more information click here.

$$HTMLhead
If you don't use the "For Web Access: Treat document contents as HTML" form property, adding a $$HTMLHead field to a form allows you to pass HTML information, such as Meta tags and JavaScript, to the Head tag for a document. The field can be any data type, but a hidden computed-for-display text field is the best choice.
(source: Notes Help 4.6)

$$QueryOpenAgent (4.6) or the form event WebQueryOpen (4.6)
The Notes Help 4.6 says about WebQueryOpen: A WebQueryOpen event runs the agent before Domino converts a document to HTML and sends it to the browser. Domino ignores any output produced by the agent in this context.
Create a shared agent that runs manually. Then write a formula that uses @Command({ToolsRunMacro}) to run the agent and attach it to the WebQueryOpen form events. This simulates the LotusScript QueryOpen form event that isn't supported on the Web.
The $$QueryOpenAgent field works in the same way. Works also in 4.6.

$$QuerySaveAgent (4.5) or the form event WebQuerySave (4.6)
The Notes Help 4.6 says about WebQuerySave: A WebQuerySave event runs the agent before the document is actually saved to disk. The agent can modify the document or use the document data to perform other operations.
Create a shared agent that runs manually. Then write a formula that uses @Command({ToolsRunMacro}) to run the agent and attach it to the WebQuerySave form events. This simulates the LotusScript QuerySave form event that isn't supported on the Web.
The $$QuerySaveAgent field works in the same way. Works also in 4.6.

$$Return
After Web users submit a document, Domino responds with the default confirmation "Form processed." To override the default response, add a computed text field to the form, name it $$Return, and use HTML as the computed value to create a customized confirmation.
(source: Notes Help 4.6)

$$ViewBody
Value is view name (in quotes) or a formula that computes the view name. Same as Embedded View.
(source: Notes Help 4.6)
This is the field you put in a form to display a view. See also the list of $$ forms below.

$$ViewList
Has no value. Same as Embedded Folder Pane.
(source: Notes Help 4.6)
This is the field you put in a form to display the list of available views and folders. See also the list of $$ forms below.

$$NavigatorBody, $$NavigatorBody_n
Value is navigator name (in quotes) or a formula that computes the navigator name.
Same as Embedded Navigator. To create multiple $$NavigatorBody fields on a form, append an underscore and a character to each subsequent field name.
(source: Notes Help 4.6)
This is the field you put in a form to display a navigator. See also the list of $$ forms below.

The following fields are no $$ fields, but they are reserved names in a Web context.

Table of CGI variables from the Notes Help 4.6

Domino captures the following CGI variables through a field or a LotusScript agent. You can also capture any CGI variable preceded by HTTP or HTTPS. For example, cookies are sent to the server by the browser as HTTP_Cookie.

Auth_Type
If the server supports user authentication and the script is protected, this is the protocol-specific authentication method used to validate the user.

Content_Length
The length of the content, as given by the client.

Content_Type
For queries that have attached information, such as HTTP POST and PUT, this is the content type of the data.

Gateway_Interface
The version of the CGI spec with which the server complies.

HTTP_Accept
The MIME types that the client accepts, as specified by HTTP headers.

HTTP_Referer
The URL of the page the user used to get here.

HTTPS
Indicates if SSL mode is enabled for the server.

HTTP_User_Agent
The browser that the client is using to send the request.

Path_Info
The extra path information (from the server's root HMTL directory), as given by the client. In other words, scripts can be accessed by their virtual path name, followed by extra information that is sent as PATH_INFO.

Path_Translated
The server provides a translated version of PATH_INFO, which takes the path and does any virtual-to-physical mapping to it.

Query_String
The information that follows the ? in the URL that referenced this script.

Remote_Addr
The IP address of the remote host making the request.

Remote_Host
The name of the host making the request.

Remote_Ident
This variable will be set to the remote user name retrieved from the server. Use this variable only for logging.

Remote_User
Authentication method that returns the authenticated user name.

Request_Method
The method used to make the request. For HTTP, this is "GET," "HEAD," "POST," and so on.

Script_Name
A virtual path to the script being executed, used for self-referencing URLs.

Server_Name
The server's host name, DNS alias, or IP address as it would appear in self-referencing URLs.

Server_Protocol
The name and revision of the information protocol accompanying this request.

Server_Port
The port to which the request was sent.

Server_Software
The name and version of the information server software running the CGI program.

Server_URL_Gateway_Interface
The version of the CGI spec with which the server complies.

Associated with a lot of the $$ fields are the following forms:

$$ViewTemplate for viewname
Requires a embedded view or $$ViewBody field
Associates the form with a specific view. The form name includes viewname, which is the alias for the view or when no alias exists, the name of the view. For example, the form named "$$ViewTemplate for By Author" associates the form with the By Author view.
Domino requires an Embedded View or the $$ViewBody field on the form, but ignores the value.
(source: Notes Help 4.6)

$$NavigatorTemplate for navigatorname
Requires a embedded navigator or $$NavigatorBody field.
Associates the form with a specific navigator. The form name includes navigatorname, which is the navigator name. For example, the form named "$$NavigatorTemplate for World Map" associates the form with the World Map navigator.
Domino requires an embedded navigator or the $$NavigatorBody field on the form, but ignores the value. Domino ignores create and read access lists on the form.
(source: Notes Help 4.6)

$$ViewTemplateDefault
Requires a embedded view or $$ViewBody field.
Makes this form the template for all Web views that aren't associated with another form.
Domino requires an embedded view or the $$ViewBody field on the form, but ignores the value.
(source: Notes Help 4.6)

$$NavigatorTemplateDefault
Requires a embedded navigator or $$NavigatorBody field.
Makes this form the template for all Web navigators that aren't associated with another form.
Domino requires an embedded navigator or the $$NavigatorBody field on the form, but ignores the value.
(source: Notes Help 4.6)

$$SearchTemplate for viewname
Associates the form with a specific view. Domino requires the $$ViewBody field, but ignores the value. The form name includes viewname, which is the alias for the view, or, when no alias exists, the name of the view. For example, the form named "$$SearchTemplate for All Documents" associates the form with the All Documents view.
(source: Notes Help 4.6)

$$SearchTemplateDefault
Domino requires the $$ViewBody field, but ignores the value. This form is the default for all Web searches that aren't associated with a specific form.
(source: Notes Help 4.6)

$$SearchSiteTemplate
In a site search this form is used in stead of $$SearchTemplateDefault
(source: posting by Andrew S Grant on Notes.Net)

$$Search
When a user initiates a text search from the Web, Domino looks in the current database or in the search site database in a multiple-database search for a form with the actual name or the alias name $$Search. If the form exists, Domino opens it; otherwise, Domino displays the default search.htm file stored in the dominoicons directory.
(source: Notes Help 4.6)

And another set of very useful forms (i didn't even know they exsisted until a few moments before):

$$ReturnDocumentDeleted
Displays to Web users when the user successfully deletes documents. Create an editable text field named MessageString to hold the error message.
(source: Notes Help 4.6)

$$ReturnAuthenticationFailure
Displays to Web users when the user's name and password can't be verified. Create an editable text field named MessageString to hold the error message.
(source: Notes Help 4.6)

$$ReturnAuthorizationFailure
Displays to Web users when the user doesn't have a high enough access level to access the database. Create an editable text field named MessageString to hold the error message.
(source: Notes Help 4.6)

$$ReturnGeneralError
Displays to Web users when any other errors occur.. Create an editable text field named MessageString to hold the error message.
(source: Notes Help 4.6)

Roles

$$WebClient
Is a role which is applied to all Web clients. This role can be very useful in hiding formulas. To check if a client is Web client use @IsMember("WebClient"; @UserRoles).


http://www.experts-exchange.com/Applications/Email/Lotus_Notes/Q_20295693.html

Reserved names for embedded elements
$$ViewBody -- Contains an embedded view
$$ViewList -- Contains an embedded folder pane
$$NavigatorBody -- Contains an embedded navigator
$GroupScheduleRefreshMode -- Contains a value for refreshing an embedded group scheduling control
$GroupScheduleShowLegend -- Valid values for it are 0 and 1. 0 means that the color legend should not display, and 1 means that it should. The default is 1.

Reserved fields for use in billing applications
$ChargeRead -- Creates a billing record when a user opens a document that contains this field
$ChargeWrite -- Creates a billing record when a user creates, copies, edits, or saves a document that contains this field

Reserved fields for general use
Categories -- Categorizes documents
$VersionOpt -- Controls version tracking for documents
FolderOptions -- Puts new documents in folders
SecretEncryptionKeys -- Encrypts documents with secret, rather than public, encryption keys
HTML -- Passes HTML directly to the server
$$HTMLHead -- Passes HTML information to be hosted within the tag for a document. The passed information might be meta data (using a tag) or JavaScript code (using a tag) or CSS information (using a tag).
$$Return -- After Web users submit a document, Domino responds with the default confirmation "Form processed." To override the default response, add a computed text field to the form, name it $$Return, and use HTML as the computed value to create a customized confirmation.

Internal fields on forms
$Title -- When a form is stored in a document, the form name is stored in this internal field. To use a different form to display the document, create an agent that deletes this stored form information and designates another form to display the document.

View or Navigator templates
$$ViewTemplate for viewname -- Embedded view or $$ViewBody field -- Associates the form with a specific view. The form name includes viewname, which is the alias for the view or when no alias exists, the name of the view.
$$NavigatorTemplate for navigatorname -- Embedded navigator or $$NavigatorBody field -- Associates the form with a specific navigator. The form name includes navigatorname, which is the navigator name. For example, the form named "$$NavigatorTemplate for World Map" associates the form with the World Map navigator.Domino ignores create and read access lists on the form.
$$ViewTemplateDefault -- Embedded view or $$ViewBody field -- Makes this form the template for all Web views that aren't associated with another form.
$$NavigatorTemplateDefault -- Embedded navigator or $$NavigatorBody field -- Makes this form the template for all Web navigators that aren't associated with another form.

Forms to specify as a custom error message
$$ReturnAuthenticationFailure -- The user's name and password cannot be verified.
$$ReturnAuthorizationFailure -- The user does not have a sufficient access level for the database.
$$ReturnDocumentDeleted -- A document was successfully deleted.
$$ReturnGeneralError -- Any other error condition has occurred.

Fields to display document properties
$File -- shows an entry for each attachment in the document.
$Links -- shows an entry for each link in the document.
$Readers -- lists authorized readers if the document contains a read access list.
$Revisions -- lists the date and time of each editing session since the first time the document was saved.
$Title, $Info, $WindowTitle, $Body, and $Actions -- are associated with a form that is stored in the document.
$UpdatedBy -- lists the document authors and editors. Anonymous forms don't have this field.
Form -- indicates the name of the form used to create the document or the name of the form most recently used to save the document. Use the form in views to select documents created with the form.
PostedDate -- indicates that a document has been mailed and shows the time and date it was mailed.

Fields in SearchResults form
Optional arguments -- Description -- Default Value
Query -- The search string -- none
SearchMax -- Maximum number of entries to return in total; 0 = no limit -- none
SearchWv -- Include word variants: TRUE or 1 or FALSE or 0 -- FALSE
SearchOrder -- 1 = by relevance2 = by date ascending3 = by date descending -- 1
SearchThesaurus -- Use thesaurus synonyms: TRUE or 1 or FALSE or 0(This option is ignored by the R5 search engine) -- FALSE
SearchFuzzy -- Use fuzzy search: TRUE or 1 or FALSE or 0 -- FALSE
SearchEntry -- Name of form to use for each result entry -- "ResultEntry"
Start -- Start document for paged results; 0 = unpaged -- 0
Count -- Number to return for paged results; 0 = unpaged -- 0
Scope -- Scope of search: 1 = notes databases only; 2 = filesystem only; 0 = both -- 0

Table of fields that control mailing options
Reserved Field name -- Values -- Comments
BlindCopyTo -- The name(s) of a person, group, or mail-in database.
CopyTo -- The name(s) of a person, group, or mail-in database.
DeliveryPriority -- L, N, H -- Values correspond to: Low, normal, or high-priority.
DeliveryReport -- 1,0 -- Use 1 to return a report when mail is delivered to recipient
Encrypt -- 1, 0 -- Use 1 to encrypt mailed documents.
MailFormat -- B, E, M, T -- Enables cc:Mail users to view Notes documents in a variety of predefined formats: B = both text and encapsulated. E = encapsulated in a Notes database, which is attached to the cc:Mail memo.M = mail. Body field of document is text and pasted into cc:Mail memo.T = text. Contents of the document are rendered as text and pasted into the body of the cc:Mail memo.
MailOptions -- 1, 0 -- Use 1 for automatic mailing.
ReturnReceipt -- 1, 0 -- Use 1 to send a receipt when document is opened by the recipient.
SaveOptions -- 1, 0 -- Use 1 to save mailed documents. Use 0 to prevent save when the form is submitted in any context.
SendTo -- The name(s) of a person, group, or mail-in database. -- Required for all forms that mail documents.
Sign -- 1, 0 -- Use 1 to an add electronic signature to fields. (Only applicable if a form also contains sign-enabled fields.)