« março 2005 | Entrada | maio 2005 »

abril 26, 2005

Windows Messages

Publicado por vitorsilva às 08:55 AM

abril 22, 2005

levantamento inicial

objectivo: desenvolver uma aplicação que controle outra.
- ambas têm ui => não estamos a dizer por exemplo para uma aplicação controlar um servidor.
- queremos que a aplicação controlada pareça uma janela da aplicação principal (tipo mdi).
- queremos abrir uma janela da aplicação controlada a partir de um evento da aplicação principal, por exemplo seleccionar uma opção de um menu e abrir a aplicação controlada num determinado estado.
- queremos restringir algumas acções na janela da aplicação controlada (controlar o tamanho, local onde pode estar a janela, etc.)
- a aplicação que queremos correr por sua vez corre dentro de uma espécie de runtime, ou seja corremos o runtime com determinados parametros para abrir a nossa aplicação no sitio que queremos.
- não convém estar sempre a correr o runtime por causa do tempo inicial de carregamento.
- a aplicação que vai correr dentro da janela controlada necessita de ter carregada um conjunto de informações globais que demoram algum tempo a carregar pelo que não podemos estar sempre a iniciar essa aplicação, temos que carregar essas informações uma vez e depois aproveitar essa sessão.

opções existentes para comunicação entre processos:
- let the apps communicate over a socket (not very efficient, but pretty easy to do)
- use a named pipe (in windows NT, at least - Linux too, I think)
- if the processes are windows, you can use SendMessage (in the Win32 API), assuming you can get each window's handle (via FindWindow or somesuch)
- use a memory-mapped file
- use a normal file, with some manner of locking (exclusive writes, for example)

a solução escolhida é o runtime que lança as janelas que queremos controlar correr inicialmente um socket server que fica à escuta de pedidos da aplicação principal e inicia os programas que nós pedimos. desta forma ultrapassamos a questão de correr várias vezes o runtime (que corre só uma vez) bem como de correr várias vezes o código que carrega as informações globais (que ficando integrado no socket server corre também só uma vez). isto resolve-nos o problema de enviar pedidos de uma aplicação para outra.
como não é a aplicação principal a iniciar esses programas (que têm janelas próprias) não conseguimos controlar directamente as suas janelas por isso temos que usar a Win32 API para fazer essa gestão de janelas.
- a opção de ficheiros (seja memory-mapped ou ficheiros normais) poderia ser interessante se quisessemos trocar dados entre as aplicações, mas no nosso caso a informação que passa entre aplicações são simples pedidos e indicação de sucesso desses pedidos.
- não explorei a opção named pipes

outros links
http://www.codeproject.com/csharp/DotNetNamedPipesPart2.asp
http://www.error-bank.com/microsoft.public.dotnet.languages.vb.1/193496_Thread.aspx

Publicado por vitorsilva às 08:49 AM

abril 20, 2005

permissões asp.net iis sql

Authentication in ASP.NET: .NET Security Guidance
Internet Information Services 5.0 Authentication Methods
ASP.NET Data Flow
INFO: ASP.NET Security Overview
Authentication methods for connections to SQL Server in Active Server Pages
Q306158 INFO: Implementing Impersonation in an ASP.NET Application
Q307002 PRB: ASP/ODBC/SQL Server Error 0x80040E4D "Login Failed for User '(Null)'"
Q253500 PRB: "Client Unable to Establish Connection" Error Message When Connecting from ASP to SQL Server
Q306586 PRB: Troubleshooting Error 80004005 "Login Failed" in ASP
Q306518 INFO: Troubleshooting Guide for 80004005 Errors in Active Server Pages and Microsoft Data Access Components
How to use Trusted Connection when SQL server and web Server are on two separate machines

Publicado por vitorsilva às 06:02 PM

abril 19, 2005

historia do computador / software

History of Internet and WWW: The Roads and Crossroads of Internet History
http://www.computerhistory.org/
http://www.softwarehistory.org/
the history of computing project
The History of Computer Programming Languages
Computer Languages History

Publicado por vitorsilva às 11:51 PM

Hello World

programado em mais de 30 linguagens de programação e afins

A "hello world" program is a computer program that prints out "Hello, world!" on a display device.
It is used in many introductory tutorials for teaching a programming language and many students use it as their first programming experience in a language.

http://encyclopedia.laborlawtalk.com/ Hello_world_program
e ainda Esoteric programming languages

Publicado por vitorsilva às 02:22 PM

windows handles

Effect of Hyperthreading on a Thread Object for Windows Animation - Paul Milenkovic

Inside Windows Handles

Version 2.0 of theForger's Win32 API Tutorial

Coupling a window handle with a data object
A window hook is a method that allows interception of Win32 API actions. These can be used for monitoring actions inside the OS and even change the input or output for API functions

Introduction to subclassing

RegisterClassEx Function

Make a form with a fixed aspect ratio in VB .NET

The interop wiki

Adding real Win32 tooltips for windowless controls

Inter process communication using registered messages from Visual Basic

Registering and using a new window class

Capturing Window Controls and Modifying their properties

Coupling a window handle with a data object

Publicado por vitorsilva às 02:20 PM

abril 18, 2005

user32.dll

Implementing Callback Functions
Exemplo EnumWindows

API calls List (USER32.DLL)

The secret life of GetWindowText
"GetWindowText() cannot retrieve text from a window from another application."

Tutorial: Capturing and Running IE Instances in a Windows control

Working with Win32 API in .NET

Get Current Window Handle and Caption With Windows API In C#

Difference between WM_GETTEXT and GetWindowText?
Question: What is the difference between sending message WM_GETTEXT and calling GetWindowText()?
Answer: You can send WM_GETTEXTLENGTH and WM_GETTEXT message even across processes. GetWindowText takes shortcuts, it tries to directly pass a WM_GETTEXT message to the target windows window function instead of using SendMessage. That does not work across process boundaries.

Enumerating and Restoring Windows Using Callbacks

EnumWindows and EnumChildWindows Callbacks

Publicado por vitorsilva às 06:59 PM

abril 15, 2005

Open Sores® Software Development

http://j-walk.com/other/ossw/
When I started Open Sores® Software Development, I had a dream. A dream to build the most successful software company in the World. That was six years ago. Today, I'm pleased to report that OSSD is well on its way to attaining that dream. We have customers in five of the 50 states, and we'll soon be visiting Canada to try to drum up some business with those poutine-eating Canucks.

Our staff is comprised of some of the tallest programmers in the industry, and I'm proud to say that we run a 100% union shop. No scab laborers, and very few illegal immigrants.

At Open Sores®, you'll appreciate what you don't get: No contracts. No EULAs. No upgrades. No Service Packs. No lawyers. No DOT-NET. No Web Services. No XML. No crap.

We do business the old-fashioned way -- with a firm handshake over a couple of beers. And we almost always pay for the beers. Our guarantee: If you're not 100% satisfied with the results, you reserve the right to file a suit in small claims court.*

* No refunds on the free beer.

Publicado por vitorsilva às 10:03 AM

breves rfid

RFID and the Media Revolution
Renowned futurist Paul Saffo (http://www.saffo.org/) predicts that RFID's biggest impact will come from surprising applications
Over the next 10 years, he said, RFID, wireless communications and robotics will each play an important role in what he calls the sensor revolution. Saffo said sensors are creating an early phase of "smartifacts," or intelligent artifacts, that are "observing the world on our behalf and increasingly manipulating it on our behalf. This is why I view RFID as a media technology. This is where I think the opportunities are for you."

what_is_rfid.pdf

The UCODE EPC G2 chip features a one-time programmable memory for the 96-bit EPC, covers all mandatory commands, and provides a selection of optional commands as specified in the G2 standard. The chip uses an anti-collision algorithm that enables the reading of up to 1,600 labels per second under current US regulations, and up to 600 labels per second under current European regulations (due to differing bandwidth availability).

Publicado por vitorsilva às 09:46 AM

Confused about the EPC RFID Tag Classes?

EPC Class Definition Programming
Class 0 "Read Only" passive tags Programmed as part of the semiconductor manufacturing process
*Class 0+ "Write-Once, Read-Many" version of EPC Class 0 Programmed once by the customer then locked
Class 1 "Write-Once, Read-Many" passive tags Programmed once by the customer then locked
Class 1 - Gen2 "Write-Once, Read-Many" passive tags. UHF Gen2 protocol ratified by EPC Global, Inc. on Dec. 16, 2004 Programmed once by the customer then locked
Class 2 Rewritable passive tags Can be reprogrammed many times
Class 3 Semi-passive tags
Class 4 Active tags
Class 5 Readers N/A
* Not an EPCglobal defined class

Publicado por vitorsilva às 09:07 AM

abril 13, 2005

diversos

HTTP Pocket Reference - HTTP Transactions

A basic Particles System
Introduction to the basic idea of the particles systems, and how to create basic effects such as explosions and water fountains

I/O Ports Uncensored Part 2 - Controlling LCDs (Liquid Crystal Displays) and VFDs (Vacuum Fluorescent Displays) with Parallel Port
Controlling LCDs (Liquid Crystal Displays) and VFDs (Vacuum Fluorescent Displays) with Parallel Port

Progress Socket Programming
This session covers TCP/IP and Socket basics, provides information on how TCP sockets are implemented in Progress 4GL, and shows how to write TCP/IP clients and servers using sockets.
Summer Technical Institute 2001
Progress External Program Interfaces

Publicado por vitorsilva às 03:46 PM

prova de contacto 9

Untitled-10 copy.jpg

Publicado por vitorsilva às 02:46 PM

abril 12, 2005

Prova de Contacto 8

Untitled-9 copy.jpg

Publicado por vitorsilva às 04:20 PM

Diversos

Making Code Coverage more palatable with NCoverViewer and NCoverBrowser
NCover tutorial

Naming, Coding, and Commenting Conventions
.NET Programming Standards and Naming Conventions - Common .NET Naming Conventions

Number Formatting in .NET

HOW TO: Secure an ASP.NET Application by Using Windows Security

Binding a DataGrid to a Collection by Ulrich Sprick
HOWTO: implement IBindingList in Winforms

progress links
http://www.icewalkers.com/opd/Computers/Software/Databases/Progress/

forum progress

Web based applications development progress

Dicionario Espanhol-Português

Publicado por vitorsilva às 04:19 PM

Programação de Sockets em .net / progress

Socket Programming in C# - Part 1 - Introduction
Socket Programming in C# - Part 2 - Introduction
A Simple .NET TCP Socket Component
Socket Programming HOWTO

So first, let's make a distinction between a "client" socket - an endpoint of a conversation, and a "server" socket, which is more like a switchboard operator. The client application (your browser, for example) uses "client" sockets exclusively; the web server it's talking to uses both "server" sockets and "client" sockets.

Publicado por vitorsilva às 04:11 PM

abril 11, 2005

prova de contacto 7

Untitled-8 copy.jpg

Publicado por vitorsilva às 04:23 PM

abril 07, 2005

XPathDocument vs XMLDocument

More Information on the XPathDocument/XmlDocument Change in Whidbey beta 2
XmlDocument and XPathDocument
Use XPathDocument instead of XMLDocument when doing XSLT to significantly boost peformance.

Publicado por vitorsilva às 11:53 AM

notas soltas rfid

http://www.rfidexchange.com/forum/topic.asp?TOPIC_ID=10&SearchTerms=range,frequency

frequências típicas
- 125Khz (magnetic) --- This frequency range was the RFID industry's first, since the early 1980's. Read ranges are typically inches to several feet.
- 13.56 MHz (magnetic) => 60-80cm --- "you get natural noise from all around (mainly the sun) that gives you a read range of about 2-3 feet max, and barely any motion detection. It is just difficult to get any passive backscatter energy from 13.56 because you have to use the near field for interrogation purposes (way too much resistance in a half wavelength antenna). However, in certain applications, 13.56 MHz is extremely useful"
- 860Mhz to 956 MHz (UHF) (electric) => 1m-4m --- At 433 MHz and 915 MHz, you can start producing more results in the asset tracking realm, because you can interrogate tags moving at decent speed (faster than a person can run at 915) and don't get much antenna loss.
- 2.45GHz ( electric) => 30cm --- At 2.4 GHz, you can't produce enough power to get a read range more than a foot, unless you incorporate some kind of active tag system. (well you can produce enough power, technically, but you'd better hope the FCC doesn't find you).

"For all intents and purposes 433 MHz-915 MHz gives you the best read range under normal environmental conditions (i.e. not a lot of moisture during the daytime), but lower bands and upper bands definitely have their place in integrated RFID systems for a multitude of reasons."
"The read range is a function of the frequency that is employed. The higher the frequency, the greater the range. This is way some organizations are persuing UHF frequencies to obtain range."

activo/passivo
- 400Mhz to 2.45Ghz => em principio passivo
- >2.4 em principio activo

problemas
- liquidos
- outros campos electromagnéticos

memoria
- 64bits...1kb...

-- velocidade acesso
"Passive transponder speed depends on a lot of variables: environment, polarization of tag and antenna, bit length and efficiency of IC of tag, frequency, "
"To put it in non-scientific terms, identifying one tag with 902-930 MHz, Class 1 EPC, is possible over 20 m.p.h. "
"ISO tags at 13.56 MHz, which should be intderrogate faster than 2 Mhz, have a 2 m.p.h limit, or close to that"

-- orientação
"Circular vs linear should consider tag orientation. If the tags are oriented with the electric field, linear polarized antennas should give a better read range. but if you have tags in all different directions then circular polarized antenna and its less, would probably be better. "
"double dipole antenna, which enables them to be read regardless of their orientation to the reader."

-- transmissão de informação
- rs232 - 10/15feet +/-4m => Introduction to RS 422 & RS 485
- bluetooth - +/- 10m
- wifi - +/-100m

Publicado por vitorsilva às 10:03 AM

prova de contacto 6

Untitled-7 copy.jpg

Publicado por vitorsilva às 08:32 AM

abril 05, 2005

história do teclado

entre outras coisas porque razão temos que usar o tipico teclado qwerty

http://www.tifaq.org/articles/keyboard_tyranny-feb98-jay_hersh.html
http://www.xpertkeyboard.com/index.htm
http://inventors.about.com/library/inventors/blcomputer_keyboard.htm
http://www.compcamps.com/camps2004/jschmidt/keyboardinfo.html
http://njnj.essortment.com/keyboardhisto_rdqo.htm
http://www.museudocomputador.com.br/enciteclado.php

Publicado por vitorsilva às 12:49 AM

abril 04, 2005

Prova de Contacto 5

Untitled-6 copy.jpg

Publicado por vitorsilva às 06:16 PM

Progress ODBC + triggers

Fiquei sem perceber.

Por um lado há 2 tipos de triggers:
(open edge data management: dataserver for odbc 2-15)
“The DataServer allows an application to execute triggers for both Progress databases (including the schema holder) and ODBC data sources (if the data source supports triggers).”

Por outro:
Distributed Databases, Array Fields, Database Triggers
Our ODBC Drivers facillate the support of the above through the use of a custom "Data Dictionary File", this file is built by running the OpenLink provided Progress Program File "setup.p" situated in the "bin" sub-directory below the OpenLink base installation directory.

E finalmente:
http://www.progresstalk.com/archive/index.php?t-48740.html
If the question is "how do I use 4GL triggers from SQL?", the answer is "you can't".

Resumindo, só testando.

Publicado por vitorsilva às 05:49 PM

abril 03, 2005

prova de contacto 4

Untitled-5 copy.jpg

Publicado por vitorsilva às 11:17 PM

abril 01, 2005

Writing Modern Progress

C1350-LV Its Not Your Father’s 4GL
apresentação sobre como aplicar novos métodos de programação no ambiente progress.
gostei principalmente deste bocado de código
Def input parameter tablename as char no-undo.
Def input parameter wherestring as char no-undo.
Def input parameter sortby as char no-undo.
Def var qrystring as char no-undo.

Create buffer hbuf for table tablename.
Hqry:add-buffers(hbuf).
Qrystring = “ for each “ + tablename + “no-lock” +
+ wherestring + sortby.
Hqry:query-prepare(qrystring).
Hqry:query-open.

Writing Modern Progress: Techniques for using the 4GL in OpenEdge.

Publicado por vitorsilva às 09:39 AM

ferramentas progress modernaças

An XML Toolkit
http://www.innov8cs.com/downloads/AnXMLToolKit.pdf
XML Toolkit for simplifying XML Documents.

prounit
ProUnit is an Open source framework for unit test on Progress 4GL components, just like JUnit, NUnit and others

Progress® Compilation Tools
PCT (Progress Compilation Tools) is a set of ANT tasks, designed to compile Progress® procedures and dump/load databases.

Progress Developer's Webring

Publicado por vitorsilva às 09:14 AM

ui

para ler quando tiver tempo
UI Articles
UI Patterns

Publicado por vitorsilva às 08:52 AM

propath

mais umas horas perdidas estupidamente...
na minha senda de testar ligações entre progress e .net segui o procedimento habitual de criar a procedure (.p), compilar (.r), definir broker (Progress Explorer Tool), criar dll (proxy generator), fazer programa (.net) e correr.
tudo bem não fosse o caso do progress procurar o .r numa path especifica que definimos nas propriedades do broker/agent/propath.
progress_propathbroker.jpg
depois de alguns testes e de inspeccionar o log do appserver
[05/03/30@14:43:21.484+0100] P-002848 T-000368 2 AS AS Application Server connected with connection id: 10.1.2.89::multiv91::3091::d9eae801a6ec778f:5d173:102f3b2643a:-7ffc. (8358)
[05/03/30@14:43:23.907+0100] P-002848 T-000368 1 AS -- nome.p Database xxxx not connected. (1006)
[05/03/30@14:43:34.783+0100] P-002848 T-000368 2 AS AS Application Server disconnected. (8360)
a conclusão a que cheguei é que da primeira vez que fiz tudo compilei o .p numa base de dados com o nome lógico errado e depois de corrigir o nome lógico esqueci-me de copiar o .r para a pasta onde o appserver vai verificar a existencia do ficheiro .r.
resumindo, mais vale acrescentar na propath a pasta para onde vão os .r quando os compilamos no application compiler.

Publicado por vitorsilva às 08:49 AM

notas progress+.net

oe appserver: developing appserver applications (2-36)
Programming for Open Client applications
In general, programming AppServer procedures for Open Client (Java, .NET, and Web service client) applications is not much different than programming for Progress 4GL clients. However, for each AppServer persistent procedure that you expect to be instantiated as an Open Client object, you must also specify the prototypes defined by all super procedures, including user-defined functions, that your persistent procedure uses. The reason for this is that the Open Client Toolkit, which generates the proxy objects and Web service interface for use by Open Client and Web service applications, analyzes the r-code to help determine class definitions for proxy objects. This r-code analysis includes any super procedure references required to define equivalent method overrides for each class.
You can specify super procedure prototypes in one of two ways, depending on how you write your procedures:
• Using the ProtoGen utility available from the OpenEdge Application Development Environment (ADE).
• Using a text editor or the Progress Procedure Editor.
Caution: Binding a single session-free AppServer agent to a single client, as described in this section, reduces the resources available to handle requests from all clients for the session-free application service. Therefore, be certain that your application requires this type of agent binding before using it for application development.
==================================
oe development: open client introduction and programming (4-9)
ProxyGen maps each 4GL non-persistent procedure, internal procedure, and user-defined function that you expose on the AppServer, to a remote 4GL method. When invoked, each remote 4GL method executes the procedure (or user-defined function) on the AppServer, passes any parameter values, and makes any return values available to the Open Client. Note: If the 4GL persistent procedure has a super procedure, the proxy also contains remote 4GL methods for the super procedure, as long as the remote procedure declares the super procedure prototypes. For more information, see the information on programming for Open Client applications in OpenEdge Application Server: Developing AppServer Applications.

Publicado por vitorsilva às 08:36 AM

easter egg

pelos vistos alguém gastou 5 minutos a escrever uma linha de código que faz com que quando um grupo de utilizadores do windows tem mais de 500 utilizadores o icon que o representa passa de um boneco normal para um boneco com cabelo branco... isto é que é sentido de humor

Hair Color of the "Person" Icon for a User Group Becomes Gray If the Group Contains More Than 500 Users

Publicado por vitorsilva às 08:34 AM

prova de contacto 3

Untitled-4 copy.jpg

Publicado por vitorsilva às 08:31 AM