Technology Innovation
Technology Innovation - Blog para Programadores Esta é uma ideia que surgiu para divulgar as possíveis soluções que possam facilitar a vida aos programadores
Segunda-feira, Fevereiro 27, 2012
UNIX: Como obter um grupo de linhas antes e depois de um grep
====================
Como obter um grupo de linhas antes e depois de um grep
-> grep -A 10 -B 10 [texto a pesquisar] [ficheiro a pesquisar]
Sábado, Fevereiro 18, 2012
SCOM Training Videos
Ou os fornecedores não o criavam, ou os sistemas só faziam logging...
E ao príncipio a monitorização integrada limitava-se a um tipo de sistema.
Isso modou com o CACTI, NAGIOS e só a Microsoft não andava muito preocupada com isso e mantinha o seu MOM dentro do círculo do windows e arredores.
Desde que a visão mudou na Microsoft à uns anos, agora com o SCOM, sim senhor... Já vi uns quantos vídeos... Estou mortinho por lhe meter as mãos :)
Até monitorizar BDs de vários suppliers... Linux, etc... Irei ter num projeto essa oportunidade para o experimentar... Vamos lá :)
http://www.microsoft.com/download/en/confirmation.aspx?id=8562
http://www.microsoft.com/en-us/server-cloud/system-center/operations-manager.aspx
http://www.youtube.com/watch?v=5wqI7tbhzxI
Terça-feira, Dezembro 27, 2011
Máximas para o próximo ano de 2012
Segunda-feira, Março 21, 2011
Atitude positiva versus Atitude positiva e proactiva
Nestes 14 anos reparei em tudo o que me rodeava e acabei por me auto formatar, e criei esta máxima:
"Ou colocas na vida Sangue, Suor e Lágrimas em tudo o que fazes ou passas pelos 'projectos' como mais um."
Eu normalmente penso que para ser só mais um, "matava-me" e desaparecia, pois só estou a estorvar - e por "matar-me" interpreto a nível profissional, procurar projectos menos aliciantes e menos visíveis.
No entanto, tento sempre aplicar Sangue, Suor e Lágrimas e muitas vezes percebo que já só posso colocar Lágrimas porque acabou-se o Sangue e o Suor,mas pelo menos as Lágrimas não são "amargas", porque penso:
"Boa, deste tudo de ti, estou orgulhoso!".
PS-> Isto não é um desabafo é uma forma de tentar motivar o gajo que está dentro de mim quando este pensa em desistir :)
E principalmente, estou bem onde estou e faço o que gosto :)
Quinta-feira, Março 10, 2011
Linux - Pesquisa de ficheiros com info do tamanho compreensível
Resultado:
[root@mymachine conf]$ ls -lh
total 332K
lrwxrwxrwx 1 root root 32 Nov 17 2009 app.properties
-rw-rw-r-- 1 root root 37K Aug 19 2010 app.properties.20100819
-rw-rw-r-- 1 root root 37K Aug 26 2010 app.properties.20100826
-rw-rw-r-- 1 root root 39K Sep 24 12:02 app.properties.20100924
-rw-rw-r-- 1 root root 40K Dec 17 16:48 app.properties.20101218
-rw-rw-r-- 1 root root 40K Jan 25 18:14 app.properties20110125
-rw-rw-r-- 1 root root 40K Feb 14 17:21 app.properties.20110214
-rw-rw-r-- 1 root root 42K Mar 2 16:02 app.properties.20110302
-rw-rw-r-- 1 root root 42K Mar 4 11:48 app.properties.20110304
lrwxrwxrwx 1 root root 35 Aug 13 2010 report.properties
-rw-rw-r-- 1 root root 1.9K Mar 2 16:41 report.properties20110302
Domingo, Março 06, 2011
Help de Comandos Linux/Unix
-ls -ltr
Ficheiro de configuração do APACHE
-> more /etc/httpd/conf.d/vodafone.conf
Restart ao Apache (para assumir as novas configurações do Apache)
-> service httpd restart
Para configurar porto do TOMCAT/CATALINA
-> vi tomcat/conf/server.xml
Para identificar quais os portos que estão configurados para escuta (java são TOMCAT)
->netstat -ap | grep LISTEN
Remove som de speaker
-> rmmod pcspkr
Comandos VI
vi [path/nomeficheiro]
x apaga
a adiciona caracters
:wq sai a gravar
# comenta linhas
Restart à placa de rede
-> service network restart
Na root dá imagem
-> more .bash_profile
Identifica o user
->whoiam
Dá as configs do sudo
->more /etc/sudoers
Para mandar para a directoria tipo "Desktop"
-> [cd ] sem parentesis e com espaço
Tar só junta todos os ficheiros em comprimir
-> tar -cf [file.tar] [dir] (zip)
-> tar -ef [file.tar] (unzip)
Verificar o que está a passar na ethernet nicps
-> tcpdump -i eth0 tcp port 22
Gzip comprime os ficheiros
-> gzip -c file1 > foo.gz
Listar conteudos do TAR
->tar -tf backup_20110214.tar
log/httpd/
log/httpd/*
-> tar -tvf backup_20110214.tar
drwx------ root/root 0 2011-02-14 16:43:16 log/httpd/
-rw-r--r-- root/root 10240 2011-02-14 16:43:29 log/httpd/*
Simbolic link para ficheiro
-> ln -s test.4 test.4-sl
Gzip comprime o ficheiro para um ficheiro gz
-> gzip -c ./log/messages > backupMessages.tar.gz
Listar todos os pacotes instalados
-> rpm -qa
Dados da máquina
-> env -gf
Para verificar os ports que estão à escuta
-> netstat -a | grep -i 10022
Validação do estado do ficheiro
-> md5sum teste.4
23bd402c1e75a52e11cb79e5d54171ac teste.4
Alterar a PWD
-> passwd [user]
Criar user:
-> useradd [nome] -p [pwd]
-> userdel [nome]
-> useradd -d /opt/[username] -s /bin/bash [username]
-> passwd [username]
Para copiar o conteúdo de um ficheiro para outro
-> Cat [origin] | grep [texto] > [destination]
Para obter uma parte só do log
-> cat messages | grep aborting > messagesshor.txt
Info do sistema de arranque
-> dmesg | more
Ficheiro com os erros de login
-> more /home/var/log/secure
CRONTAB
-> crontab -l (lista)
-> crontab -e (edita)
Verificar o log do Cron
-> tail -f /var/log/cron
Atribuir valores a variáveis
-> s = 10
-> a = 20
-> expr = a / s
Para criar e executar Batch
-> vi variscript
-> chmod 755 variscript
-> sh variscript
Para contar linhas com uma determinada identificação
-> more fic.txt | wc "teste"
Ficheiro com os grupos de utilizadores
-> more /etc/group
Ficheiro com os utilizadores
-> more /etc/passwd
Transforma um binario em String
-> strings /usr/bin/awk
Para colocar um processo a correr em backgroud
-> [processo ou comando] & bg
Comando para validar HW
-> lspci
-> lshal
Para ver o Software
-> lsb_release -a
Para o TOP dar 1 só vez
->top -n1
Para o TOP dar 1 só vez e só para o tasks
->top -n1 | grep Tasks
Arrancar o serviço APACHE
-> service httpd start
Alterar a Firewall
-> system-config-securitylevel
Quinta-feira, Outubro 21, 2010
Resumo dos últimos 14 anos
Comecei em 1996 a minha carreira na área das TI's e logo como Consultor na área de BI, DSS, etc... numa pequena empresa chamada Contalgest.
Pequena em tamanho porque eramos poucos mas grande nos projectos.
Montámos o 1º Painel de Análise de Clientes da Portugal Telecom. Grande avanço na forma de ver o resultado das mudanças da PT nos clientes - aqui o grande companheiro foi sempre o Pedro Costa.
De seguida em 2000 entrei na Novabase pela porta da NBO e pela mão do Luis Setubal. Foram 2 anos de grandes desenvolvimentos (Direcção Geral de Energia, Sociedade Ponto Verde, Compal e outros) e de grande aprendizagem - a equipa do Paulo Santos ajudou e muito nessa adaptação.
Depois surgiu em 2002 a oportunidade ir para a área da TV (ainda na Novabase) mas 3 semanas depois dou entrada novamente numa pequena empresa (DotOnTheBox) em Almada, onde desenvolvemos algumas das melhores soluções/softwares para a TVCabo - aqui o espirito de equipa era fundamental para o nosso sucesso - grande liderança da Anabela/Tiago.
Aqui conquistei 1º Prémio de TV Interactiva em 2003 na TV Cabo - contra a Novabase.
Chegamos a 2004 e abrem-se as portas de par em par novamente na Novabase e desta vez com a prespetiva de continuar o bom trabalho da Dot (viemos todos para cá - aquisição de talentos disseram eles :)).
Nesta Novabase encontrei elementos de equipa fantásticos (João, Nuno, Luis, entre outros - sempre liderados pela Mónica), conseguimos alguns dos projectos mais importantes da Novabase na áreas de sistemas operacionais (sempre em complemento das restantes equipas que desenvolviam para as STB - Alex Cardoso, Vitor, Paulo, Filipe, Paulo, etc...).
Por motivo de mudança da estratégia de negócio (motivada pela saída do Director Pedro Casqueiro que tinha uma visão de serviços para TV orientado ao fornecimento de soluções completas (a Novabase por outro lado sempre viu os Recursos como a melhor forma de negócio), abandonou-se então a estratégia e desmembraram a nossa equipa.
Foi então que depois de 2 anos de passagem pelo "deserto" (quem comigo esteve sabe do que falo), fui convidado para liderar a equipa de suporte de IPTV da Vodafone no serviço "Vodafone Casa TV".
Este já era o 2º grande desafio na minha carreira (o 1º tive de deixar passar), onde encontrei muitos e bons elementos na Novabase que ainda não tinham tido a sua oportunidade.
Estamos lá 24x7 (uns presencialmente outros como eu - em espírito ou ao telefone :)). Aqui sinto-me em "casa", com grande apoio da equipa da Vodafone que nos apoia/coordena - Filipe Araújo e Manuel Narciso e Pedro Aço.
A ver o que o Futuro me reserva :)
Sábado, Outubro 02, 2010
Estou de Volta...
MS Access: SisCond - Sistema de Gestão de Condomínios
MS Access: SisRenda - Sistema de Gestão de Rendas
Terça-feira, Junho 27, 2006
Microsoft Speech: How to use?
(It's possible to use to a ASP.NET file)
Sample Struture:

How to Add the Speech Lib:

VB.NET Sample:
Download
Segunda-feira, Junho 26, 2006
VB.NET: Put a Image into Button
imageAux = New Bitmap("C:\Picture1")
Me.Button1.BackgroundImage = imageAux
VB.NET: Random Numbers
Randomize()
intRandomPos = Rnd(1) * 10
This will return Numbers from 0 to 1 and multiply by 10
Resume:
Gives numbers from 0 to 10
Segunda-feira, Abril 17, 2006
ASP.NET "Atlas" April Community Technology Preview (CTP)
ASP.NET codename "Atlas" is a set of technologies to add Ajax (Asynchronous JavaScript And XML) support to ASP.NET. It consists of a client-side script framework, server controls, and more.
Overview
This new Web development technology from Microsoft integrates client script libraries with the ASP.NET 2.0 server-based development framework. In addition, 'Atlas' offers you the same type of development platform for client-based Web pages that ASP.NET offers for server-based pages. And because 'Atlas' is an extension of ASP.NET, it is fully integrated with server-based services. "Atlas" makes it possible to easily take advantage of AJAX techniques on the Web and enables you to create ASP.NET pages with a rich, responsive UI and server communication. However, 'Atlas' isn't just for ASP.NET. You can take advantage of the rich client framework to easily build client-centric Web applications that integrate with any backend data provider.
"Atlas" enables you to take full advantage of the capabilities of the browser to deliver richer web experiences that work on any modern browser
"Atlas" enables ASP.NET developers to enrich their web applications with incredible ease
"Atlas" includes a rich client-side Javascript framework that enables easy creation and reuse of script components and rich client-side behaviors.
"Atlas" makes it super easy to consume services from ASP.NET, and to build composite applications from services on the programmable web.
Quinta-feira, Abril 13, 2006
PRB: Convert String to Double
The Product Purchase Price was 2,99€ but the server was converting it into 299€.
I Change the "Regional Setting" for (,) instead of (.), but doesn't solve the problem.
To solve the problem i change all CDBL(valueStr.Replace(".", ",")) calls by:
Double.Parse(valueStr.Replace(".", ","), New System.Globalization.CultureInfo("pt-PT", False).NumberFormat)
The Double value appeares correctly. And the Parameter Value [False], force the CultureInfo to assume "pt-PT" even if user have another configuration in "Regional Settings"
Regards
Paulo Pires
Sexta-feira, Março 31, 2006
ATC: WebService NameSpace
Encontrei na Web que os WebServices e as WebApps comunicam e referenciam-se pelos NameSpaces.
O URL lá existente pode não existir, mas tem que ser único.
Mas aconselha-se que se coloque o URL de destino do projecto, pois assim, garante-se que é único.
PRB: Server did not recognize the value of HTTP Header SOAPAction
Hipoteses porque pode acontecer ocasionalmente.
Solução 1: Verificar o NameSpace do WebService (se foi alterado)
Solução 2: Update à Webreference e Compilação do Projectos
Solução 3: Re-Compilação do WebService e Update à Webreference e Compilação do Projecto
Solução 4: Se o Webservice chama outros Webservices, verificar todos os NameSpaces dos Webservices que são chamados
Terça-feira, Março 07, 2006
PRB: How to force System to use Framework 1.1 in WebService
< startup >
< requiredRuntime version="v1.1.4322" safemode="true" / >
< / startup >
Link to Info in Microsoft
Quinta-feira, Janeiro 19, 2006
Dynamic Web Controls, Postbacks, and View State
By Scott Mitchell
Introduction
As I've written about in two previous articles here on 4Guys - Dynamic Controls in ASP.NET and Working with Dynamically Created Controls - ASP.NET makes it easy to programmatically add Web controls. Armed with this capability, you can offer a truly customized experience for your users. For example, your site might load particular navigational elements as user controls, based upon the logged on user's preferences. Or when collecting information from your users, you might display different input fields prompting for different data based on the user's age, location, gender, and so on.
One of the main challenges with working with dynamically added controls is that these controls must be programmatically added on each postback. That is, you can't just load these controls on the first page load, and then not reload them on subsequent postbacks. Failure to explicitly add the controls on each postback will cause the controls to literally disappear on postbacks. To further complicate things, the point in the page's lifecycle when dynamic controls are added is important if you want to maintain changed values across postback. For example, imagine you had a Web page that displayed a series of input form fields based on the user visiting the page. The idea here would be to allow the visitor enter some values into these custom input form fields, and then submit the form, having the data saved. If the dynamic Web controls are not added at the correct time in the page's lifecycle, the values entered by the visitor will be lost on postback.
In this article we will examine how to add dynamic Web controls to a page in such a manner that you will not need to worry about losing form field values on postback. Specifically, we'll look at how to create a page whose form fields are dependent upon the user visiting the page, and how this user can enter their data into these form fields and have it saved on form submission. Since this article builds upon concepts discussed earlier, please make sure you have read both Dynamic Controls in ASP.NET and Working with Dynamically Created Controls before tackling this article.
Article: 4 Guys From Rolla
Sexta-feira, Dezembro 30, 2005
SQLSERVER 2005 - Transact-SQL Error Handling
http://www.15seconds.com/issue
(In English)
Summary:
"OVERVIEW
The robust Transact-SQL (T-SQL) syntax in SQL Server provides developers with an efficient way to handle errors within stored procedures. This article discusses the @@ERROR, SP_ADDMESSAGE, and RAISERROR functions within SQL Server.
The @@ERROR Function
Upon the completion of any T-SQL statement, SQL Server sets the @@ERROR object. If the statement was successful, @@ERROR is set to 0, otherwise it is set to the designate error code. All SQL Server error codes can be found within the master.dbo.sysmessages system table. One important thing to remember is that @@ERROR is cleared each time a statement is executed. It is a good practice to store the value within a local variable.
"
Quinta-feira, Novembro 24, 2005
Store Commonly Used Code Snippets in the Toolbox
This tip comes in from Korby Parnell:
One of my favorite VS.NET productivity tricks is to store code snippets as toolbox items. Arguably, this trick is better for comments than code since you can't reference them. To add text to the Toolbox, highlight it in the code editor, drag it over to your toolbox, and drop it when the tooltip changes from the no smoking sign into rectangle. Thereafter, you can simply drag and drop the snippet to your editor for reuse.
Customizing VS.NET by 4GuysFromRolla
Store Commonly Used Code Snippets in the Toolbox
This tip comes in from Korby Parnell:
One of my favorite VS.NET productivity tricks is to store code snippets as toolbox items. Arguably, this trick is better for comments than code since you can't reference them. To add text to the Toolbox, highlight it in the code editor, drag it over to your toolbox, and drop it when the tooltip changes from the no smoking sign into rectangle. Thereafter, you can simply drag and drop the snippet to your editor for reuse.
Customizing VS.NET by 4GuysFromRolla
Quarta-feira, Novembro 23, 2005
Conferência no TAGUS PARK

Seminário GAPI
A informação, base do conhecimento, é um elemento determinante na sociedade actual, transmite-se à velocidade da Luz e é partilhável sem limites.
O conhecimento é desenvolvido a partir da informação que detemos e do investimento em actividades de investigação e desenvolvimento (I&D), que importa proteger.
O Estado, através do sistema de propriedade industrial, assegura a protecção destes investimentos, reconhecendo a sua autoria e impedindo a sua utilização indevida mas, em contrapartida, torna patente, ou seja, conhecidos, os resultados da investigação. Desta forma, divulgando mais informação suscita o desenvolvimento de mais conhecimento.
Interessa pois conhecer as fontes da informação, sua organização e formas de acesso, para se poder beneficiar deste excelente instrumento de apoio à inovação, que são as Bases de Dados da Propriedade Industrial.
Marcas, Nomes de Empresas e “Sites” são protegidos e registados por diversas entidades (INPI, RNPC, FCCN).
As Patentes, os Desenhos e os Modelos de Utilidade são também protegidos e registados no INPI. Trata-se de um sistema complexo agora apresentado de forma coerente neste seminário organizado pelo GAPI do Taguspark.
Terça-feira, Novembro 22, 2005
Add Line Numbers to Your Code-Behind Classes
Did you know that you can add line numbers to your code files in VS.NET? Line numbers are especially helpful if discussing a block of code with someone else, as you can refer to a specific line numbers. To turn on line numbers, go to the Tools menu, choose Options, and from the left-hand side select the Text Editor / C# or the Text Editor / Basic options. In the right-hand side you'll find a "Line numbers" checkbox. Check this and line numbers will be added to your code files, as shown below.

Customizing VS.NET by 4GuysFromRolla
Customize the Start Page
When Visual Studio .NET loads up, by default the Start Page is shown, which lists the most recent projects. 4Guys reader Jon Vandermeulen writes in on how to tweak VS.NET so that more than just the default four projects are shown on the Start Page:
By default, your start page only shows the last 4 projects you worked on. But if you're like us, then you would routinely work on quite a few more than that. The setting is located in Tools > Options > Environment > General > Display ___ items in most recently used list.
Customizing VS.NET by 4GuysFromRolla
Quarta-feira, Novembro 16, 2005
META TAG no html-reference.com
Try this example of webpage transactions:
< meta http-equiv="Page-Exit" content="revealTrans(Duration=1.0,Transition=23)" >
Note: Will do an random transaction from page. Don't work on Reload
META TAG no html-reference.com
Quarta-feira, Novembro 09, 2005
PRB: Memory allocated in an Windows Application/Windows Service
To avoid this:
Include Code:
Private Declare Function SetProcessWorkingSetSize Lib "kernel32.dll" (ByVal dwMinimumWorkingSetSize As Int32, ByVal dwMaximumWorkingSetSize As Int32) As Int32
Public Function NewSaveMemory() As Int32
GC.Collect()
GC.WaitForPendingFinalizers()
SetProcessWorkingSetSize(-1, -1)
End Function
Include Timer (5sec):
Private Sub TimerCleanMem_Elapsed(ByVal sender As System.Object, ByVal e As System.Timers.ElapsedEventArgs) Handles TimerCleanMem.Elapsed
NewSaveMemory()
End Sub
This functions will release the memory that are in the Garbage Collector
I hope this help
Segunda-feira, Novembro 07, 2005
PRB: Convert special chars to HTML compatible
- Solution: Substitute them with the HTML code
You can convert them directly in:
http://www-atm.physics.ox.ac.uk
Sexta-feira, Outubro 21, 2005
PRB: .NET Windows Service - "Sub Main was not found."
Region " Component Designer generated code "
' The main entry point for the process
Shared Sub Main()
Dim ServicesToRun() As System.ServiceProcess.ServiceBase
ServicesToRun = New System.ServiceProcess.ServiceBase() {New SendSMS}
System.ServiceProcess.ServiceBase.Run(ServicesToRun)
End Sub
Now just need to compile again
Segunda-feira, Outubro 17, 2005
PRB: "The specified Web server is not running ASP.NET version 1.1" error message when you create an ASP.NET 1.1 application and you have both ASP.NET
http://support.microsoft.com/
Execute command:
(...)Microsoft.NET\Framework\v1.1.4322
[aspnet_regiis.exe -i]
ASP.NET 1.1, 32-bit version
To run the 32-bit version of ASP.NET 1.1, follow these steps:1. Click Start, click Run, type cmd, and then click OK.
2. Type the following command to enable the 32-bit mode:
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
3. Type the following command to install the version of ASP.NET 1.1 and to install the script maps at the IIS root and under:
%SYSTEMROOT%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i
4. Make sure that the status of ASP.NET version 1.1.4322 is set to Allowed in the Web service extension list in Internet Information Services Manager.
http://support.microsoft.com/?id=894435
Quinta-feira, Setembro 29, 2005
InteractiveTvWeb.Org
Many DTV receivers have a limited range of capabilities when it comes to supporting video and graphics. The HAVi UI model, with its separate devices for video, background and graphics, reflects these capabilities to some extent, but there are elements that digital TV developers need to be aware of. If you're not an experienced developer of STB software, these limitations may not be obvious at first.
A set-top box is not a PC
In a typical PC platform, video and graphics are all rendered in software (even if the video is decoded in hardware, the rendering is usually handled by software). This makes life easy when it comes to scaling and positioning video - since everything is done in software, the video is just like any other content that can be scaled, clipped and repositioned. Since it's just another piece of data to be rendered, it's easily integrated into the windowing system and coexists easily with the graphics as long as the host CPU is fast enough.
InteractiveTvWeb.Org
How to Secure Sql Server Communications
It is often vital for applications to be able to secure the data passed to and from a SQL Server database server. With SQL Server 2000, you can use SSL to create an encrypted channel. This How To shows you how to install a certificate on the database server, configure SQL Server for SSL and to verify that the channel is secure.
- MSDN
A Secure SQL Server
Microsoft SQL servers are one of the favorite targets for Internet hackers, primarily because of the activity of worms (e.g. SQL Spida, Slammer) spreading through this service, secondly because the access to unsecured, however Internet-connected SQL servers is quite easy. In this article I would like to describe the rules for safeguarding the Microsoft SQL Server service to help you, dear readers, prevent yourselves from the consequences of possible attacks.
- WindowSecurity.com
Quarta-feira, Setembro 28, 2005
Sql Server 2005 Roadshow - Resumo
Ontem no Roadshow de Sql Server 2005, os pontos mais importantes foram apresentados pelo Luis Silva da Rumos, que apresentou as duas sessões que estão em baixo:
- Scalabity
- Availability
Aqui ficam os scripts que serviram para a sessão:
- Scripts Sql Server 2005
Outro ponto que foi de interesse foi o facto do SqlServer 2005 trazer um software de desenvolvimento de DSS - Cubos, um gênero de Visual Studio Lite que, incorporado com o Visual Studio 2005 vai criar a possibilidade de termos vários tipos de projecto, incluindo BI - Business Inteligence...
Mais pormenores proximamente...
Developer Information Online: Channel9 at msdn
Este é um site feito para ter pequenos sketcs com dicas para programadores... Não deixem de lá dar uma volta...
Channel9
Visual Studio 2005 Prerelease Software
Visual Studio 2005 and SQL Server 2005 were designed to help you build data-driven applications more easily and quickly than before. Order or download Visual Studio 2005 Beta 2 and experience the integration of Visual Studio 2005 and SQL Server 2005 for yourself. Visit the SQL Server 2005 page to learn more about that product.
VS2005
Get Ready for Visual Studio 2005 with Free* Microsoft E-Learning Courses and Clinics
Whether you are interested in creating Windows forms, building Web applications, implementing Data Access, or finding out about Visual Studio Team System, you can access the E-Learning topic you want, when you want it, and learn at your own pace. Each lesson includes hands-on virtual labs and offline functionality. These courses, valued at $99.00 each won't be free forever, so sign on today.
In addition, you may consider taking a free Microsoft Skills Assessment to help you meet your Visual Studio 2005 training goals. You'll receive a learning roadmap with additional skills resources including instructor-led classroom training and books. Take a skills assessment today.
For more information, visit the Visual Studio 2005 Learning Resources page.
VisualStudio 2005
Learn ASP.NET
MSDN
SQL Server 2005 New Features for Developers Virtual Workshop Session 1
Virtual workshop brings the classroom to your desktop. You can now take courses from the convenience of your office or home, saving valuable travel time and expenses, while obtaining the benefits from live, instructor-led training!
Virtual workshops enable Hands-On learning Labs over the Internet by creating a virtual lab environment using Microsoft® LiveMeeting® running on Microsoft Virtual PC®, and replicated as many times as required on Microsoft Virtual Server®. To attend a virtual workshop, students require a phone line, a connection to the Internet, and the ability to download and run LLIFT and LiveMeeting (see system requirements for details). At the appointed time, all students and the instructor log in for the class. The instructor can view and control each virtual machine and, if desired, can also conduct private phone sessions with individual students. Virtual workshops enable the economical delivery of hands-on instructor-led training programs to remotely dispersed students.
Microsoft.com
Quarta-feira, Setembro 21, 2005
Visual Studio Team System on Tour Now!
======================================
Agora a sua equipa de software pode colaborar mais eficazmente com uma grande inovação da Microsoft: Visual Studio Team System, uma plataforma de ferramentas do ciclo de vida do software que expande significativamente a linha de produtos Visual Studio. Descubra como pode reduzir a complexidade de fornecer soluções modernas e orientadas a serviços, aumentando a qualidade e previsibilidade dos projectos.
Esta apresentação ao vivo dá-lhe uma oportunidade única de beneficiar da informação em primeira-mão sobre este tema, bem como de partilhar e discutir as suas questões e experiências com peritos nesta área.
Informações Gerais sobre o Evento
=================================
Produtos: .NET Framework e Visual Studio.
Destinatários Recomendados: Arquitecto, Decisor Tecnológico, Profissional de TI e Programador.
Link para a página de registo do Evento Microsoft
Terça-feira, Setembro 13, 2005
Roadshow MS SqlServer 2005
Benefícios Por Participar Neste Evento
- Sessões com conteúdos técnicos sobre o SQL Server 2005
- Entendimento das funcionalidades e tecnologias para a criação de um ambiente de bases de dados altamente disponível e escalável
- Como tirar partido das capacidades de Business Intelligence incluídas na nova versão para uma recolha e análise de dados rápida, eficiente e ao alcance de qualquer utilizador
- Conhecimento dos procedimentos de migração para SQL Server 2005
Quem Deve Participar
- Administradores de base de dados
- Administradores de sistemas
- Programadores
- Arquitectos de bases de dados e business intelligence
- Responsáveis por projectos de migração de base de dados
Link do evento na Microsoft
Quarta-feira, Setembro 07, 2005
WebServices - How to sort alfabetic the webmethods list
- C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG\DefaultWsdlHelpGenerator.aspx
Look for line:
Hashtable methodsTable = new Hashtable();
Change to:
//Hashtable methodsTable = new Hashtable();
SortedList methodsTable = new SortedList();
And that's it. Your WebMethods List is sorted Alphabetic.
Terça-feira, Agosto 30, 2005
Format datetime variable type
Custom DateTime Format Strings
You can exercise greater control over how a DateTime object is formatted by using custom DateTime format specifiers to create your own custom DateTime format string. Combine one or more custom format specifiers to construct a DateTime formatting pattern that yields the output you prefer. In fact, most of the standard DateTime format specifiers are aliases for formatting patterns specified in the currently applicable DateTimeFormatInfo Class.
My Example:
// PPI: I need to format date like this "01/12 - 12:05", but (/) was replaced
// with (-) so I invented an formula :D
dteCreditDate.ToString("dd_MM - hh:mm").Replace("_", "/")
http://msdn.microsoft.com
http://www.experts-exchange.com
ASCII Table references
http://www.lookuptables.com/
VB.NET Array usage
Dim values(10) As Integer
As in VB 6, you can declare an array without bounds it. Later you can use ReDim to give it a size.
Dim values() As Integer
...
ReDim Preserve values(5)
Declare multi-dimensional arrays by separating the dimensions with commas.
Dim values1(9, 9) As Integer ' A 100 element array.
Dim values2(,) As Integer ' No bounds yet.
ReDim values2(9, 9) ' Give it bounds.
If you declare an array without bounds, you can initialize it during the declaration. Put the array items inside parentheses, separated with commas. The system automatically figures out what dimensions to use.
' An array with three values,
' indexes 0 through 2.
Dim values() As Integer = {1, 2, 3}
To initialize an array of objects, use the object constructors inside the value vector.
Dim primary_colors() As Pen = { _
New Pen(Color.Red), _
New Pen(Color.Green), _
New Pen(Color.Blue) _
}
For multi-dimensional arrays, put values for an array of one fewer dimensions inside more parentheses and separated by commas.
' A 2-D array with six values,
' indexes (0, 0) through (1, 2).
Dim values(,) As Integer = { _
{1, 2, 3}, _
{4, 5, 6}}
' A 3-D array with 12 values,
' indexes (0, 0, 0) through (1, 1, 2).
Dim values(,) As Integer = { _
{{1, 2, 3}, _
{4, 5, 6}}, _
{{7, 8, 9}, _
{10, 11, 12}} _
}
http://www.vb-helper.com
Sexta-feira, Agosto 12, 2005
Security Clinics & Labs
Learn on your own schedule.
At your own pace.
In your own office.
Our free Microsoft® Security E-Learning Clinics follow the same content outline as our Security Webcasts, but deliver that information via a learner-centered format that offers unique user benefits. With an E-Learning Clinic, you can access the security topic you want, when you want it, and learn at your own pace. Each lesson can be paused, and all security topics are indexed for fast and easy repeat use. So sign on today for an E-Learning Clinic, and get free information that can help you better protect your organization against security threats.
In addition to E-Learning clinics, we also offer free Microsoft Official Hands-On Labs Online where you can perform security-related procedures in a safe, networked environment powered by Microsoft Virtual Server technology. Hands-On labs let you see for yourself how to implement the security best practices discussed in the clinics.
Microsoft Security Hands-On Labs are also offered for free at participating Certified Partners for Learning Solutions. For these and other security training options, please visit the Security Program Guide.
https://www.microsoftelearning.com/security/
Using the New Visual Studio 2005 Report Controls
Want to add rich data reports to your Windows applications? Brian Welcker shows how the new report controls in Visual Studio 2005 make it easy to embed managed server reports or build and embed local reports into your Windows Forms application.
"http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20050616SQLServerBW/manifest.xml
Terça-feira, Junho 07, 2005
LDAP - User Validation
Dim entry As New DirectoryEntry("LDAP://" & strLDAPServerIP & "/rootDSE", strUsername, strPassword, AuthenticationTypes.Secure)
Try
Dim strName As String = entry.Name ' PPI: This is one simple try, if failed, User isn't
Return ConfigurationSettings.AppSettings("strResponseOK")
Catch ex As System.Runtime.InteropServices.COMException
Return ex.Message
End Try
End Function
Segunda-feira, Abril 11, 2005
CodeSmith - New Version (Code AutoCreator - DB and App)
Here is a summary of what's new:
- Completely re-written parser/compiler which is faster and correctly reports line numbers from the template instead of from the compiled template source. This results in a much nicer debugging experience.
- XML support - There is now an XmlProperty directive that makes working with XML MUCH easier. This directive will give you a strongly typed object model to work with if you provide an XSD schema or it will give you an XmlDocument instance if you don't. This feature combined with the new IntelliSense feature make working with XML a breeze.
- IntelliSense in CodeSmith Studio.
- Template caching.
- New Register directive that makes working with sub-templates much nicer.
- Console client has been improved to include a batch mode, setting properties from the command line, and the ability to use any merge strategy.
- Merge strategies have been overhauled to be more extensible and can be setup to work with any language.
- New PreserveRegions merge strategy has been introduced.
- DbDocumenter templates have been overhauled to be a best-practices sample for 3.0.
- Indented output rendering.
- IPropertySerializer interface can be implemented to allow for serialization of custom property types.
- New PreRender and PostRender methods that can be overridden in your templates.
- Ability to auto-execute SQL scripts after generating them.
- Ability to render to more than one TextWriter at a time.
- SQL 2005 compatibility.
- Tons of other minor improvements and bug fixes.
Installer: http://www.codesmithtools.com/download/codesmith30beta3.exe
Zip: http://www.codesmithtools.com/download/codesmith30beta3.zip
Beta Forum: http://www.ericjsmith.net/codesmith/forum/default.aspx?f=18
Thanks,
Eric J. Smith
CodeSmith Tools
Quinta-feira, Abril 07, 2005
Working with GUID in vb.net
strGuid = "CF7EAB76-DC16-46BB-A44D-A301C5BA6319"
defaultLang = New Guid("{" & strGuid & "}")
Sexta-feira, Março 18, 2005
DataSet - Transformar XML vindo de um WebService em DATASET
Dim objmyDS As New DataSet
Dim myXml As New XmlDataDocument
myXml.LoadXml(objTransactionManagerRef.GetClientFavorites(idClient).OuterXml())
objmyDS.ReadXml(New XmlNodeReader(myXml.DocumentElement))
Quinta-feira, Março 17, 2005
Authentication for web services
Aqui fica o Link para o documento integral:
http://www.codeproject.com/cs/webservices/
authforwebservices.asp
Outra possível solução:
Quando o WSE 2 ainda estava em versao beta eu construiu um esquema para um projecto que tinha em maos na altura. depois o projecto foi cancelado e acabei por nao utilizar a framework na pratica. Da uma olhadela ao codigo. A grande vantagem residia na facilidade configuracao e utilizacao se a comunicacao fosse de .Net para .Net. Pode ser que ajude.
Aqui fica o Link para o documento integral:
http://www.pontonetpt.com/Artigos/209.aspx
Overloading for WebMethods
===========
This property useful when we want overloading the WebMethods.
For Example
< WebMethod() > _
Public Function SayHello(ByVal sName As String) As String
Return "Hi" & " " & sName
End Function
< WebMethod(MessageName:="SayHello") > _
Public Function SayHello()As String
Return "Hi Ragavan"
End Function
Restante artigo:
http://www.c-sharpcorner.com/
WebForms/WebServicesP3RSR.asp
Quarta-feira, Março 16, 2005
Sql Server 2005 - Tech Briefings
We will continue to add deeper and more comprehensive information as the product nears release, so please check back regularly for new and exciting SQL Server 2005 webcasts.
http://www.microsoft.com/events/series/
technetsqlserver2005.mspx
Segunda-feira, Março 14, 2005
Getting Directory Contents List
Dim strXMLFileName As String
Dim objDirectoryInfo As New IO.DirectoryInfo(strBaseXmlDIR)
Dim objFileInfo As IO.FileInfo() = objDirectoryInfo.GetFiles()
Dim objFileInfoElement As IO.FileInfo
For Each objFileInfoElement In objFileInfo
strXMLFileName = strBaseXmlDIR + "\" + objFileInfoElement.ToString()
ListBox1.Items.Add(strXMLFileName)
Next
Best or possible way to return XML from WebServices
< WebMethod(Description:="This method Gets Data") > _
Public Function GetData(ByVal intParameter As Integer) As XmlDataDocument
Dim myXml As New XmlDataDocument
myXml.LoadXml("Data to Return")
return myXml
End Function
Como obter os valores desse XML:
Dim myXml As New XmlDataDocument
myXml.LoadXml(WebService.GetData(intParameter).OuterXml())
Como obter os valores desse XML num só ramo:
Dim myXml As New XmlDataDocument
Dim strRet As String = ""
If (myXml.Item("EquipmentDataList").HasChildNodes()) Then
strRet = myXml.LastChild("Father").Item("Child").InnerText
end if
Para dúvidas peçam ajuda
Paulo A. J. Pires
Quarta-feira, Março 09, 2005
WebServices: INFO: HTTP GET and HTTP POST Are Disabled by Default
This article discusses changes in the .NET Framework 1.1 that affect the HTTP GET method and the HTTP POST method on a Web server. This article also describes workarounds for this new functionality.
The .NET-connected Web services support HTTP GET, HTTP POST and SOAP protocols. By default, in .NET Framework 1.0, all three protocols are enabled. By default, in .NET Framework 1.1, HTTP GET and HTTP POST are both disabled. This is for security reasons.
http://support.microsoft.com/default.aspx?scid=kb;en-us;819267
Segunda-feira, Março 07, 2005
How to Enable Remote Debugging on Windows XP Service Pack 2
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnwxp/html/xpsp2remotedebug.asp
MSDN Technical Briefing
http://www.microsoft.com/portugal/msdn/eventos/
TBNovembro/default.aspx
Sexta-feira, Março 04, 2005
Accessing OLAP using ASP.NET - Creating a .NET Web Application to Access OLAP
http://www.aspfree.com
Accessing Sql Server Datawarehouses Over the Web.
Este documento pode ajudar e muito a fazer o acesso a Olaps via WEB.
Fica aqui o Link: Documento integral em PDF
Quarta-feira, Março 02, 2005
.NET Framework - TimeSpan
The value of an instance of TimeSpan represents a period of time. That value is the number of ticks contained in the instance and can range from Int64.MinValue to Int64.MaxValue. A tick is the smallest unit of time that can be specified, and is equal to 100 nanoseconds. Both the specification of a number of ticks and the value of a TimeSpan can be positive or negative.
A TimeSpan can be represented as a string in the format "[-]d.hh:mm:ss.ff" where "-" is an optional sign for negative TimeSpan values, the "d" component is days, "hh" is hours, "mm" is minutes, "ss" is seconds, and "ff" is fractions of a second. For example, a TimeSpan initialized to 1.0e+13 ticks represents "11.13:46:40", which is 11 days, 13 hours, 46 minutes, and 40 seconds.
Due to a varying number of days in months and years, the longest unit of time that is used by TimeSpan is the day.
This value type implements the IComparable interface.
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/cpref/html/frlrfsystemtimespanclasstopic.asp
Terça-feira, Março 01, 2005
.NET Framework Tools - Installer Tool (Installutil.exe)
The Installer tool allows you to install and uninstall server resources by executing the installer components in a specified assembly. This tool works in conjunction with classes in the System.Configuration.Install Namespace.
URL: http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/cptools/html/cpconinstallerutilityinstallutilexe.asp
ASP.NET - PRB: Cannot Upload Large Files When You Use the HtmlInputFile Server Control
“PRB: Cannot Upload Large Files When You Use the HtmlInputFile Server Control”
Ao tentar fazer o upload dava um erro de “The Page Can Not Be Displayed”, ou seja, dava o erro do upload ser enorme e (erro 403), de seguida dava o erro de página não encontrada (404) pois eu não tinha definida a página para o erro 403.
Depois de pesquisar encontrei a solução: http://support.microsoft.com/default.aspx?
scid=kb;en-us;295626
SOLUÇÃO DO ERRO DO UPLOAD
=========================
c:\WINNT\Microsoft.NET\Framework\v1.1.4322\CONFIG
Filename: machine.config
< httpRuntime
executionTimeout="90"
maxRequestLength="819200"
useFullyQualifiedRedirectUrl="false"
minFreeThreads="8"
minLocalRequestFreeThreads="4"
appRequestQueueLimit="100"
enableVersionHeader="true"
/>
Solução: Alterar o maxRequestLength para o valor necessário ou aceitável no meu caso passei o para 819200 (800 MB) e, testei com um ficheiro de 150 MB e passou, na tentativa de passar um ficheiro de 660 MB não passou, o que pode estar relacionado com a falta de memória no servidor, pois o maxRequestLength está limitado em 2 GB mas só aconselham usar 1 GB e esta memória é partilhada pelos processos de .NET a correr e a monitoria do serviço, por isso em determinados momentos pode ser bastante inferior a 1 GB.
Espero que possa ajudar no futuro a todos os que usem UPLOAD de ficheiros.
Directiva @Page em .NET
Como configurar a Directiva @Page. Podem ver por exemplo o AspCompact para aceder a DLLs em VB6 em .NET.
URL: http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/cpgenref/html/cpconPage.asp
ASP.NET - 10 Tips for Writing High-Performance Web Applications
No e-mail da Microsoft (newsletter) vinha este documento que pode ser interessante.
O URL:http://msdn.microsoft.com/msdnmag/issues/05/01/
ASPNETPerformance/default.aspx
ASP.NET 2.0 - Discovering the New Visual Basic 2005 Language Enhancements
No e-mail da Microsoft (newsletter) vinha este documento que pode ser interessante.
O URL é : http://msdn.microsoft.com/vstudio/default.aspx?pull=/library/en-us/dnhcvs04/html/vs04k1.asp
Acesso em Server Side a um outro ASPX que retorna valores
Imports System.Net
Dim myRequest As HttpWebRequest
myRequest.Create(URL).GetResponse()
Uso da função RANDOM do SqlServer
Experimentem:
- EXEC USP_CreateRandomPWD 0, 4 -> Exemplo para PIN 4 algarismos
- EXEC USP_CreateRandomPWD 1, 20 -> Exemplo para Password de 20 caracteres
A Store Procedure está no 1º Comentário...


