In principal, despre .NET, VB6. C#,VB.NET, ASP.NET Apoi despre programare si multe alte chestii ... de programare.

Subscribe RSS   Mini tools List

luni, aprilie 30, 2007

newslinks aprilie 2007
Va rog sa folositi acest URL NOU de la
http://serviciipeweb.ro/iafblog/

O sa le las cu descrierea din Engleza -dar mergeti pe mina mea...

Javascript code prettifier

LH Top 10: Free Windows Downloads - Lifehacker
Computers make us more productive. Yeah, right. Lifehacker recommends the software downloads and web sites that actually save time. Don't live to geek; geek to live.

PC World - The 50 Best Tech Products of All Time
From breakthrough hardware to time-honored software, we salute those amazing products that changed technology--and our lives--forever.

Contexts in .NET: Decouple Components by Injecting Custom Services into Your Object's Interception Chain -- MSDN Magazine, March 2003
The .NET Framework can use contexts as an object's execution scope and intercept calls going to and from the object, similar to the way COM+ provides component services. What is new with this mechanism is that the runtime allows developers to take part in the interception chain and add powerful services, thus extending existing component services. This in turn decouples the business logic from the system plumbing and simplifies long-term maintenance. Presently, .NET contexts and interception are undocumented aspects of .NET. This article presents the underlying interception architecture and message processing, explains custom context attributes, and walks through a custom interception-based component service.

AOP: Aspect-Oriented Programming Enables Better Code Encapsulation and Reuse -- MSDN Magazine, March 2002
Aspect-oriented Programming (AOP), a paradigm invented at Xerox PARC in the 1990s, lets the developer better separate tasks that should not be inextricably tangled, such as mathematical operations and exception handling. The AOP approach has a number of benefits. First, it improves performance because the operations are more succinct. Second, it allows programmers to spend less time rewriting the same code. Overall, AOP enables better encapsulation of distinct procedures and promotes future interoperation.

ScottGu's Blog : Tip/Trick: Url Rewriting with ASP.NET
People often ask me for guidance on how they can dynamically "re-write" URLs and/or have the ability to publish cleaner URL end-points within their ASP.NET web applications. This blog post summarizes a few approaches you can take to cleanly map or rewrite

ExcelPackage: Office Open XML Format file creation
ExcelPackage provides server-side generation of Excel 2007 spreadsheets. It is a set of classes and wrappers around the .NET 3.0 System.IO.Packaging API and the new Office Open XML file format. It extracts away the complexity of dealing with the individual XML components making it real easy to create sophisticated spreadsheets on the server.

100% Reflective Class Diagram Creation Tool - The Code Project - C# Programming
100% Reflective Class Diagram Creation Tool

The Old New Thing : Try to avoid having BOOL function parameters
What does FALSE mean here again?

Coding4Fun : Creating an ASP.NET Hangman Control
In this post, Stephen Walther shows you how to create an ASP.NET Hangman control. This control contains embedded images, sounds, XML, and Javascript. Stephen Walther Steve's Blog Difficulty: Easy Time Required: Less than 1 hour Cost: Free Software: Visual

15 Seconds : Managing the Risks When Outsourcing Offshore
In recent years, increasing numbers of businesses have chosen to outsource their development overseas. While outsourcing can increase productivity and efficiency while lowering operating costs, it brings with it some inherent risks. This article discusses five major risks of outsourcing as well as methods of mitigating these risks.

Download Visual Studio .NET 2003 Posters

Tip/Trick: Enabling SSL on IIS 7.0 Using Self-Signed Certificates: ASP Alliance
In this article, Scott demonstrates how to enable Secured Sockets Layer (SSL) on IIS 7.0 using self signed certificates.

The Art of Project Management: How to Make Things Happen

Google AJAX Feed API - Sign Up

How To Choose CD/DVD Archival Media » Ad Terras Per Aspera
Ad Terras Per Aspera: Transmissions from the Little Blue Marble

Junfeng Zhang's Windows Programming Notes : AppDomain and Shadow Copy
.Net Framework has a feature called Shadow Copy . When shadow copy is enabled on an appdomain, assemblies loaded in that appdomain will be copied to a shadow copy cache directory, and will be used from there. 

Organization Chart Generator - The Code Project - C# Libraries
An article on the development of an Organization Chart generator.

www.lumisoft.ee - /lswww/download/downloads/

Lazycoder » Blog Archive » How to protect yourself in Bubble 2.0

Digital Web Magazine - Seven JavaScript Techniques You Should Be Using Today
Digital Web Magazine - Seven JavaScript Techniques You Should Be Using Today



Post page: http://serviciipeweb.ro/iafblog/2007/04/30/newslinks+Aprilie+2007.aspx

Weblog post by 'admin' on 'newslinks aprilie 2007'

Categories:newslinkuri;programare

Programarea in .NET - partea a 17-a Rapoarte in ASP.NET –Windows Forms
Va rog sa folositi acest URL NOU de la
http://serviciipeweb.ro/iafblog/

Haideti sa repetam ceea ce am facut in ASP.NET pentru WindowsForms

Deschideti Book.sln, adaugati o noua forma in proiect(frmPublisherPrint.cs) si trageti ReportViewer in forma.(Daca nu il gasiti, click dreapta in Toolbox, alegeti "choose items" , cautati ReportViewer din namespace-ul Microsoft.Reporting.WinForms si selectati-l

 

 

 

Adaugam raportul existent prin click dreapta pe BookWin

 

Va duceti in BookWeb, alegeti din casuta "Files of type" ultima selectie "All files" si selectati rptPublisher.rdlc.

Acum click pe el si in fereastra de proprietati alegeti la "Copy to output directory " "Copy always"

 

 

 

 

Bun – acum au ramas 3 lucruri de facut : vizualizarea formei ca actiune, legarea controlului de raportul existent si codul de incarcare a datelor in raport.

 

Pentru vizualizarea formei ca actiune adaugati un buton btnPrint in frmPublisherList iar pe eveniment scrieti urmatorul cod:

private void btnPrint_Click(object sender, EventArgs e)

{

frmPublisherPrint p = new frmPublisherPrint();

p.ShowDialog(this);

}

 

Pentru legarea controlului vom seta la proprietati calea catre raport(presupunem ca se va afla in acelasi folder) si processing mode la local

 

Ultimul lucru de facut – incarcarea colectiei pe evenimentul de load :

rivate void frmPublisherPrint_Load(object sender, EventArgs e)

{

BookObjects.ColPublisher publishers = new BookObjects.ColPublisher();

publishers.Load();

MessageBox.Show(""+publishers.Count);

ReportDataSource rds = new ReportDataSource("DataSet1_Publisher", publishers);

rptPublisher.ProcessingMode = ProcessingMode.Local;

rptPublisher.LocalReport.DataSources.Clear();

rptPublisher.LocalReport.DataSources.Add(rds);

rptPublisher.LocalReport.Refresh();

rptPublisher.RefreshReport();

}

( exact acelasi cod ca la Web, in afara liniei :

 

Ea previne cazul( des intilnit) in care editorul IDE adauga , cu de la sine putere, un ReportDataSource .

Ceea ce se va infatisa va fi:

 

 

 

 

 

Ce mai e de facut

1)frmPublisherPrint sa nu mai afiseze ce vrea ea - ci sa primeasca un argument(in constructor, de exemplu) care sa spun ce lista de publisher-i are de afisat

2) Avind in vedere ca rapoartele sunt aceleasi pentru Windows si Web , ar fi interesant de facut un dll care sa intoarca raport – ul cerut

 

Post page: http://serviciipeweb.ro/iafblog/2007/04/28/Programarea+In+NET+Partea+A+17a+Rapoarte+In+ASPNET+Windows+Forms.aspx

Weblog post by 'admin' on 'Programarea in .NET - partea a 17-a Rapoarte in ASP.NET –Windows Forms'

Categories:.NET;programare;tutoriale

vineri, aprilie 27, 2007

From Journeyman to master - 90% din ceea ce trebuie sa stie un programator
Va rog sa folositi acest URL NOU de la
http://serviciipeweb.ro/iafblog/


Am fost impresionat de The Pragmatic Programmer - From Journeyman to Master .


Nu este o carte de programare .NET - dar este o carte EXCEPTIONALA de programare
Iata cum incepe :

Programming is a craft. At its simplest, it comes down to getting a computer to do what you want it to do (or what your user wants it to do). As a programmer, you are part listener, part advisor, part interpreter, and part dictator. You try to capture elusive requirements and find a way of expressing them so that a mere machine can do them justice. You try to document your work so that others can understand it, and you try to engineer your work so that others can build on it. What's more, you try to do all this against the relentless ticking of the project clock. You work small miracles every day.

Daca nu ati citit-o, cumparati-o sau cereti cunoscutilor o copie. E o carte de referinta.
Din partea mea avind in vedere ca "The limits of language are the limits of one's world.(Ludwig Von Wittgenstein) "(citat din aceeasi carte) o sa scriu citeva tehnici din carte, alaturi de modalitati de a le realiza prin .NET

The Cat Ate My Source Code
Citat : "If the disk crashes—taking all of your source code with it—and you don't have a backup, it's your fault. Telling your boss "the cat ate my source code" just won't cut it."

Comentarii : orice solutie de Source safe, backupuri

Software Entropy
Citat :"Don't leave "broken windows" (bad designs, wrong decisions, or poor code) unrepaired. Fix each one as soon as it is discovered. If there is insufficient time to fix it properly, then board it up. Perhaps you can comment out the offending code, or display a "Not Implemented" message, or substitute dummy data instead. Take some action to prevent further damage and to show that you're on top of the situation."

 Comentarii : puteti face asa ceva si cu atribute pe cod sursa http://en.csharp-online.net/Attributes

Orthogonality
Citat :"Two or more things are orthogonal if changes in one do not affect any of the others. In a well-designed system, the database code will be orthogonal to the user interface: you can change the interface without affecting the database, and swap databases without changing the interface."

Comentarii  : Strongly Typed Dataset(http://msdn.microsoft.com/msdnmag/issues/04/12/DataPoints/), 3-tier development Reversibility

Citat : "But you said we'd use database XYZ! We are 85% done coding the project, we can't change now!" the programmer protested. "Sorry, but our company decided to standardize on database PDQ instead—for all projects. It's out of my hands. We'll just have to recode. All of you will be working weekends until further notice."

Comentarii : Pentru cazul de mai sus puteti folosi NHibernate, de ex. sau orice alt ORM (http://weblogs.asp.net/yreynhout/archive/2003/10/07/30798.aspx )

The Power of Plain Text
E normal ca unele date de test sa fie in text - iar avind in vedere usurinta cu care .NET (de)serializeaza(http://msdn2.microsoft.com/en-us/library/system.xml.serialization.xmlserializer.aspx) in XML - e usor de facut.

Shell Games
Aici avem power shell(http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx)

Power Editing
Nu mai zic nimic despre IDE de VS Express - e free si destul de puternic.

Source Code Control
E normal de folosit pentru backup si revizuire de istoric aici standardul pina acum e SourceSafe ... dar CVS si Subversion vin din urma puternic

Debugging
VS Ide face o treaba buna - fie in ASP.NET, fie in Windows Forms

Text Manipulation
Avem expresii regulate pentru aceasta - pentru mine au fost de ajuns.

Code Generators
Sunt atitia ca mi-e greu sa decid. CodeSmith desigur, apoi cautati pe Google http://www.google.com/search?q=code+generator+.net&start=0
Pe de alta parte, pentru compilare de cod in Runtime plecind de la fisiere avem compilatoare gata pregatite , vezi, de exemplu , csharpcodeprovider(http://msdn2.microsoft.com/en-us/library/microsoft.csharp.csharpcodeprovider.aspx) si pentru generarea rapida avem DynamicMethod Class (http://msdn2.microsoft.com/en-us/library/system.reflection.emit.dynamicmethod(vs.80).aspx)

Design by Contract
Intr-o privinta , avem interfetele.Dar in ce priveste preconditiile si postconditiile, stam cam prost.Exista Eiffel http://www.eiffel.com/products/eifaspnet/index.html care implementeaza WebService prin DBC ... dar cam atit.

Dead Programs Tell No Lies
E usor in teorie - cu throw si definirea de Exceptii (http://msdn2.microsoft.com/en-us/library/aa309092(VS.71).aspx) Mai greu este de facut.

Assertive Programming
Avem debug.Assert pentru aceasta.

How to Balance Resources
Sfaturi generale referitoare la cine e raspunzator de ce resurse- mai ales de cele care nu se "elibereaza" singure -handlere de fisiere, etc .
Va trebui sa cititi intreg articolul de aici (http://www.bluebytesoftware.com/blog/PermaLink.aspx?guid=88e62cdf-5919-4ac7-bc33-20c06ae539ae)despre IDisposable sau macar articolul pe scurt de aici http://www.atalasoft.com/cs/blogs/stevehawley/archive/2006/09/21/10887.aspx

Metaprogramming
Puteti folosi atribute pentru acest lucru (http://www.codeproject.com/csharp/dotnetattributes.asp) sau sa generati automat clase si sa le compilati la runtime( vezi mai sus CodeGenerators)

Workflow - vine in curind Windows Workflow Foundation (WF) http://wf.netfx3.com/

It's Just a View
Despre evenimente in .NET s-au scris mult.
Gasiti rapid aici o referinta usoara de utilizat http://msdn2.microsoft.com/en-us/library/system.eventhandler(VS.71).aspx


Blackboards 
ramine de facut ...se incumeta cineva?

Code That's Easy to Test
folositi NUnit sau Testele din VSTS


Inca o data , faceti rost de ea si cititi-o!

Post page: http://serviciipeweb.ro/iafblog/2007/04/26/From+Journeyman+To+Master+90+Din+Ceea+Ce+Trebuie+Sa+Stie+Un+Programator.aspx

Weblog post by 'admin' on 'From Journeyman to master - 90% din ceea ce trebuie sa stie un programator'

Categories:carti;programare

joi, aprilie 26, 2007

cum sa integrezi Visual Source Safe cu Visual Studio
Va rog sa folositi acest URL NOU de la
http://serviciipeweb.ro/iafblog/

Daca ati instalat VS si nu il vedeti pe VSS la tools=> options    => Source control => plugin selection , e suficient sa inregistrati SSSCC.DLL din <Program Files>\Microsoft Visual Studio\VSS\netsetup.x86\VSS\win32
M-am chinuit 3 ore sa gasesc asta... si m-am gindit sa mai usurez munca cuiva...

Post page: http://serviciipeweb.ro/iafblog/2007/04/26/cum+Sa+Integrezi+Visual+Source+Safe+Cu+Visual+Studio.aspx

Weblog post by 'admin' on 'cum sa integrezi Visual Source Safe cu Visual Studio'

Categories:.NET;programare;vss

marți, aprilie 24, 2007

Intrebare de cunostinte IIS...
Va rog sa folositi acest URL NOU de la
http://serviciipeweb.ro/iafblog/

Am vrut sa pun o suita de fisiere intr-un director pentru a fi downloadate. Fisierele erau Word(.doc) si Outlook(.msg). Am facut o pagina in care citea ce fisiere sunt in directorul curent si le lista cu marime si data( stiu, se putea face si prin setarea de DirectoryBrowsing ...)
Pun la mine fisierele, verific ca pagina afiseaza lista de fisiere si ca merge download-ul.Totul OK
Pun fisierele pe site- verific ca pagina afiseaza lista de fisiere , dar download la .doc merge, la .msg da eroarea 404.
Nu e vorba de permisiuni- fisierele au aceleasi permisiuni.
Care e problema?Cum puteti identifica?
Raspunsul- vedeti primul comentariu. Dar mai intii, ginditi-va un pic...

Post page: http://serviciipeweb.ro/iafblog/2007/04/23/Intrebare+De+Cunostinte+IIS.aspx

Weblog post by 'admin' on 'Intrebare de cunostinte IIS...'

Categories:programare

duminică, aprilie 22, 2007

PROGRAMAREA IN .NET - PARTEA A 16-A RAPOARTE IN ASP.NET
Va rog sa folositi acest URL NOU de la
http://serviciipeweb.ro/iafblog/

Orice aplicatie trebuie sa aiba posibilitatea de a tipari datele. Pentru aceasta in VS2005 Express se poate folosi componenta Report Viewer care e free si se poate downloada de la http://www.gotreportviewer.com.

Dupa ce o instalati, o sa aveti in toolbox urmatoarea componenta:

 

 

Acum adaugam un raport care sa fie afisat de catre aplicatie – deschidem aplicatia Web si adaugam un nou item de tipul Report si il numim rptPublisher.rdlc :

 

 

Acum adaugam un nou datasource apasand pe Add New DataSource

 

 

In ecranul urmator apasam pe NewConnection si selectam baza noastra de date:

 

Putem salva conexiunea in Web.Config(desi o mai avem) si apasam Next. Pe urmatorul ecran lasam selectat "Use SQL Statements" si iarasi Next. Acum scriem codul pentru SQL:

 

SELECT IDPublisher, NamePublisher, SitePublisher

FROM Publisher

 

si iarasi Next pina se termina ( sau direct Finish).

 

Acum in WebSite DataSource ne-a aparut dataset-ul care contine Publisher

 

 

Ne ducem pe Toolbox si tragem pe rptPublisher.rdlc un Table

Ne intoarcem pe WebSite DataSources si tragem Name Publisher pe detaliu:

 

 

Acum sa verificam

Cream o noua pagina aspx, frmPublisherReport.aspx si scriem urmatorul cod(sau tragem controlul de ReportViewer si ii spunem care e raportul)

<%@ Page Language="C#" MasterPageFile="~/Book.master" AutoEventWireup="true" CodeFile="frmPublisherReport.aspx.cs" Inherits="frmPublisherReport" Title="Report Publisher" %>

 

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<rsweb:ReportViewer ID="rptPublisher" runat="server">

<LocalReport ReportPath="rptPublisher.rdlc">

</LocalReport>

</rsweb:ReportViewer>

</asp:Content>

 

In codul C# punem urmatoarele linii :

using System;

using System.Data;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

using Microsoft.Reporting.WebForms;

 

public partial class frmPublisherReport : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

BookObjects.ColPublisher publishers = new BookObjects.ColPublisher();

publishers.Load();

ReportDataSource rds = new ReportDataSource("DataSet1_Publisher",publishers);

rptPublisher.ProcessingMode = ProcessingMode.Local;

rptPublisher.LocalReport.DataSources.Add(rds);

rptPublisher.LocalReport.Refresh();

 

}

 

}

 

Si modificam fisierul rdlc deschizindu-l cu notepad-ul si scriind urmatoarele:

<?xml version="1.0" encoding="utf-8"?>

<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

<DataSources>

<DataSource Name="BookConnectionString">

<ConnectionProperties>

<ConnectString />

<DataProvider>SQL</DataProvider>

</ConnectionProperties>

<rd:DataSourceID>c649d533-64c3-42b6-9805-19adbfccd468</rd:DataSourceID>

</DataSource>

</DataSources>

<BottomMargin>1in</BottomMargin>

<RightMargin>1in</RightMargin>

<rd:DrawGrid>true</rd:DrawGrid>

<InteractiveWidth>8.5in</InteractiveWidth>

<rd:SnapToGrid>true</rd:SnapToGrid>

<Body>

<ReportItems>

<Table Name="table1">

<Footer>

<TableRows>

<TableRow>

<TableCells>

<TableCell>

<ReportItems>

<Textbox Name="textbox7">

<rd:DefaultName>textbox7</rd:DefaultName>

<ZIndex>1</ZIndex>

<Style>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

<CanGrow>true</CanGrow>

<Value />

</Textbox>

</ReportItems>

</TableCell>

</TableCells>

<Height>0.45833in</Height>

</TableRow>

</TableRows>

</Footer>

<Left>0.5in</Left>

<DataSetName>DataSet1_Publisher</DataSetName>

<Top>0.25in</Top>

<Width>6.5in</Width>

<Details>

<TableRows>

<TableRow>

<TableCells>

<TableCell>

<ReportItems>

<Textbox Name="txtName">

<rd:DefaultName>Name</rd:DefaultName>

<Style>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

<CanGrow>true</CanGrow>

<Value>=Fields!Name.Value</Value>

</Textbox>

</ReportItems>

</TableCell>

</TableCells>

<Height>0.45833in</Height>

</TableRow>

</TableRows>

</Details>

<Header>

<TableRows>

<TableRow>

<TableCells>

<TableCell>

<ReportItems>

<Textbox Name="textbox1">

<rd:DefaultName>textbox1</rd:DefaultName>

<ZIndex>2</ZIndex>

<Style>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

<CanGrow>true</CanGrow>

<Value>Name</Value>

</Textbox>

</ReportItems>

</TableCell>

</TableCells>

<Height>0.45833in</Height>

</TableRow>

</TableRows>

</Header>

<TableColumns>

<TableColumn>

<Width>6.5in</Width>

</TableColumn>

</TableColumns>

<Height>1.375in</Height>

</Table>

</ReportItems>

<Height>2in</Height>

</Body>

<rd:ReportID>9f0247a8-15fe-4ef9-962e-c4c670524163</rd:ReportID>

<LeftMargin>1in</LeftMargin>

<DataSets>

<DataSet Name="DataSet1_Publisher">

<rd:DataSetInfo>

<rd:ObjectDataSourceType>Publisher</rd:ObjectDataSourceType>

<rd:TableName>Publisher</rd:TableName>

</rd:DataSetInfo>

<Query>

<rd:UseGenericDesigner>true</rd:UseGenericDesigner>

<CommandText />

<DataSourceName>BookConnectionString</DataSourceName>

</Query>

<Fields>

<Field Name="IDPublisher">

<rd:TypeName>System.Int32</rd:TypeName>

<DataField>IDPublisher</DataField>

</Field>

<Field Name="Name">

<rd:TypeName>System.String</rd:TypeName>

<DataField>Name</DataField>

</Field>

<Field Name="Site">

<rd:TypeName>System.String</rd:TypeName>

<DataField>Site</DataField>

</Field>

</Fields>

</DataSet>

</DataSets>

<Width>9.75in</Width>

<InteractiveHeight>11in</InteractiveHeight>

<Language>en-US</Language>

<TopMargin>1in</TopMargin>

</Report>

 

 

Acum , rulind pagina, observam ca se poate exporta raportul in Excel si PDF – mai mult decit sufficient:

 

Data viitoare vom vedea acelasi raport in WindowsForms...

 

Linkuri utile:

http://www.gotreportviewer.com/ - in partea dreapta aveti exemple de aplicatii care fac diverse – genereaza automat fisierele rdlc, scot automat fisierele Excel si multe altele

SQL Server Reporting Services – pentru utilizarea avansata a rapoartelor.

Post page: http://serviciipeweb.ro/iafblog/2007/04/22/PROGRAMAREA+IN+NET+PARTEA+A+16A+RAPOARTE+IN+ASPNET.aspx

Weblog post by 'admin' on 'PROGRAMAREA IN .NET - PARTEA A 16-A RAPOARTE IN ASP.NET'

Categories:.NET;programare;tutoriale

joi, aprilie 19, 2007

Softisti din Romania, uniti-va!
Va rog sa folositi acest URL NOU de la
http://serviciipeweb.ro/iafblog/

Referitor la angajatori in IT - frustrare revarsata inca o intimplare adevarata...

Ma contacteaza un tip(nu dau numele) pe yahoo : Poti, te rog, sa imi dai un script care in Outlook 2003 sa  trimita automat reply inapoi ?
OK- zic eu- si in 1/2 h il fac, ii dau instructiuni cum sa il instaleze...Ma rog, nu e rau sa faci din cind in cind o fapta buna.

Dar revine: as vrea si urmatoarele reguli - dar repede!

1. daca la subiect nu apare !!RE si nici !!!RE si mailul nu contine attach sau poza sa adauge la inceputul subiectului !!RE + la body reply1

2. daca la subiect nu apare apare !!RE si nici !!!RE si mailul contine poza sau attach sa adauge la inceputul subiectului !!RE + la body reply2

3. daca la subiect apare !!RE (indiferent daca contine/nu contine poza sau attach) sa adauge la subiect "!!!RE" + la body reply3

4. daca la subiect apare !!!RE sa nu trimita reply, sa il ignore

OK- a inceput in momentul ala sa imi sara tandara

1. Nu sunt la dispozitia nimanui ( OK , sunt la dispozitia angajatorului 8 ore - dar ala ma plateste...)
2. Nu imi plac cei carora, daca le iei un deget, vor sa iti ia toata mina
3. Ma enerveaza oamenii ce sunt de parere ca scopul celorlalti e sa-i serveasca...


Asa ca i-am spus ca vreau bani sau ce face cu scriptul - la care tipul imi spune( textual!):
Pai, saptamana viitoare ma mut pe un mail de server pe care pot sa lucrez cu outlookul si si as avea nevoie de scriptul ala sa citesc mailuri ?!


Tare de tot.
Dragi softisti : daca va roaga cineva sa faceti un scriptulet si daca aveti timp si chef, ajuta-ti-l.
Daca incepe sa vrea marea cu sarea - si nu va plateste REFUZATI-L SCURT!
E plina lumea de smecheri care ii iau pe ceilalti de prosti - nu ii incurajati!



Post page: http://serviciipeweb.ro/iafblog/2007/04/19/Softisti+Din+Romania+Unitiva.aspx

Weblog post by 'admin' on 'Softisti din Romania, uniti-va!'

Categories:inconsistente;programare;proprii

miercuri, aprilie 18, 2007

conexiune deschisa si Excel
Va rog sa folositi acest URL NOU de la
http://serviciipeweb.ro/iafblog/

Am avut de facut o aplicatie care sa tipareasca automat niste rezultate care provin de la o niste rinduri de Excel, trecute printr-o functie dintr=o BD SQL Server.
Normal  ca am facut o functie in VBA care sa faca asta:
Public Function valoarescan(val)
    If (Len(val) = 0) Then Exit Function
    Dim t As Range
    Set t = val
   
   Dim rs As ADODB.Recordset
   Dim cn As ADODB.Connection
   Set cn = New ADODB.Connection
   cn.ConnectionString = "Driver={SQL Server};Server=(local);Database=....;Trusted_Connection=Yes;"
   cn.Open
    Set rs = cn.Execute("SELECT [user].[functie] ('" & t.Text & "')")
   
    valoarescan = rs(0).Value
    cn.Close
    'MsgBox Len(valoarescan)
   
   
End Function
Ceea ce am observat este ca dura mult prea mult(2 minute) pentru 31 de rinduri, asa incit ceea ce am facut este sa nu mai respect BestPractices pentru o conexiune, ci sa folosesc aceeasi conexiune
Dim cn As ADODB.Connection
Public Function valoarescan(val)
    If (Len(val) = 0) Then Exit Function
    Dim t As Range
    Set t = val
   
   Dim rs As ADODB.Recordset
   Dim cn As ADODB.Connection
   If (cn Is Nothing) Then
   cn.ConnectionString = "Driver={SQL Server};Server=(local);Database=....;Trusted_Connection=Yes;"
   cn.Open
    End If
    Set rs = cn.Execute("SELECT [user].[functie] ('" & t.Text & "')")
   
    valoarescan = rs(0).Value

    'MsgBox Len(valoarescan)
   
   
End Function


Rezultat: merge in aprox 2 secunde !
Drawback: Conexiunea nu se inchide... - pentru ca nu stiu care e ultima oara cind se apeleaza...

As putea sa fac o clasa care sa refoloseasca conexiunea - si pe Terminate sa o distruga... dar am fost bucuros ca mi-a dat...

Concluzia : Citeodata e bine sa nu respecti bestpractices!

Post page: http://serviciipeweb.ro/iafblog/2007/04/18/conexiune+Deschisa+Si+Excel.aspx

Weblog post by 'admin' on 'conexiune deschisa si Excel'

Categories:programare

marți, aprilie 17, 2007

14 Surefire Ways to Annoy Users
Va rog sa folositi acest URL NOU de la
http://serviciipeweb.ro/iafblog/

De la The 20 Most Annoying Tech Products
citeva sugestii despre cum sa faci programe fara succes:

  1. Force us to reboot our systems any time we install or uninstall your product.
  2. Automatically install into the Windows system tray and launch at startup.
  3. Force us to read the manual just to figure out how to turn on the damned thing.
  4. Pop up little reminders for things we don't want to do.
  5. Make tech-support contact information nearly impossible to find--or, better yet, don't include any.
  6. Install a bunch of extra software nobody asked for or wants.
  7. Automatically sign us up for e-mail newsletters and other announcements.
  8. Charge us $35 per call to speak to "Bob" in Bangalore when we have problems.
  9. Force us to upgrade products to get the same functionality we already had in the old version.
  10. Make us enter the same information (like e-mail addresses) multiple times.
  11. Require us to retype squiggly letters that are virtually impossible for humans to decipher when signing up for new accounts. (Note to Microsoft: This means you.)
  12. Force us to register products and/or nag us until we capitulate.
  13. Promise to remember our log-ins and password, yet still make us enter them every time.
  14. Insist on updating the product when all we want to do is quit it and go home.



Post page: http://serviciipeweb.ro/iafblog/2007/04/17/14+Surefire+Ways+To+Annoy+Users.aspx

Weblog post by 'admin' on '14 Surefire Ways to Annoy Users'

Categories:programare

sâmbătă, aprilie 14, 2007

PROGRAMAREA IN .NET - PARTEA A 15-A OPERATII ASINCRONE IN ASP.NET SI AJAX
Va rog sa folositi acest URL NOU de la
http://serviciipeweb.ro/iafblog/

Modelul asincron din ASP.NET

 

 

 

Sa discutam despre operatii asincrone in ASP.NET.

Exista doua tipuri mari de operatii operatii asincrone

1. Cele care se executa doar pentru operatii lungi , care iau ceva timp de executie, si pentru care user-ul trebuie instiintat de evolutia lor.

2. Cele care trimit rapid o cerere la server si se intorc.

 

Pentru 1.,o solutie recomandata este sa puneti Async=true in codul de pagina si sa executati codul cu RegisterTaskAsync . Asta este interesant, pina cind ne dam seama ca modul de afisare al paginii este acelasi – adica este intirziata pina cind se termina toata de executat.

 

Un exemplu bun gasiti aici

http://msdn.microsoft.com/msdnmag/issues/05/10/WickedCode/#S5

si aici

http://msdn.microsoft.com/msdnmag/issues/07/03/WickedCode/default.aspx

 

Totusi, as recomanda o alta abordare – pentru ca user-ul sa „vada" desfasurarea detaliata a actiunilor efectuate, as recomanda scrierea cu Response.Write intr-un div si ascunderea apoi a div-ului .

Ceva de genul acesta:

 

Pe pagina aspx, printre ultimele linii, ascunderea div-ului cu mesaje:

<script>

var mesaje = document.getElementById('mesaje');

if(mesaje != null)

mesaje.style.display = 'none';

</script>

 

In codul paginii aspx putem pune cod de genul urmator:

Response.Write("<div id='mesaje'>");

Response.Write("Begin :" + DateTime.Now.ToString("yyyy MMM dd hh:mm:ss") + "<BR>");

Response.Flush();

//executare prim task

Response.Write("Generated prim task<BR>");

Response.Flush();

//executare al doilea task

Response.Write("Generated al doilea task<BR>");

Response.Flush();

//incheiere procedura...

Response.Write("</div>");

Response.Flush();

 

 

Acest model se poate combina cu evenimente generate in cadrul task-ruilor astfel incit, daca task-urile dureaza prea mult, user-ul sa aiba totusi un feedback despre ceea ce se intimpla.

 

Sa discutam acum despre 2, executarea de operatii rapide pe server. Sa dam un exemplu simplu, si anume cautarea de publisher dupa nume. Ar fi superb daca aplicatia noastra, la apasarea primei litere a publisher-ului, ar putea sa sugereze publisher-ii care incep cu litera respectiva.

Pentru aceasta vom folosi Ajax, si vom folosi implementarea de AutoComplete de la Ajax Control Toolkit

Mai intii ,trebuie sa downloadam Ajax1.0 de aici.

 

Apoi va trebui sa modificam Web.Config astfel incit sa suporte Ajax.

Asta inseamna ca o sa luam o mare parte din Web.Config-ul unui site Ajax si o sa il mutam la noi in site.

Sa incepem :

De la o configuration o sa luam

<configSections>

<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>

<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>

<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>

<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>

</sectionGroup>

</sectionGroup>

</sectionGroup>

</configSections>

 

De la system.web o sa luam

<pages>

<controls>

<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</controls>

</pages>

Si

<compilation debug="false">

<assemblies>

<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

<add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies>

</compilation>

 

Apoi Handler-e si Module:

<httpHandlers>

<remove verb="*" path="*.asmx"/>

<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>

</httpHandlers>

<httpModules>

<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</httpModules>

Apoi extensions si WebServer:

<system.web.extensions>

<scripting>

<webServices>

<!-- Uncomment this line to customize maxJsonLength and add a custom converter -->

<!--

<jsonSerialization maxJsonLength="500">

<converters>

<add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>

</converters>

</jsonSerialization>

-->

<!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->

<!--

<authenticationService enabled="true" requireSSL = "true|false"/>

-->

<!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved

and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and

writeAccessProperties attributes. -->

<!--

<profileService enabled="true"

readAccessProperties="propertyname1,propertyname2"

writeAccessProperties="propertyname1,propertyname2" />

-->

</webServices>

<!--

<scriptResourceHandler enableCompression="true" enableCaching="true" />

-->

</scripting>

</system.web.extensions>

<system.webServer>

<validation validateIntegratedModeConfiguration="false"/>

<modules>

<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</modules>

<handlers>

<remove name="WebServiceHandlerFactory-Integrated"/>

<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</handlers>

</system.webServer>

 

Acum downloadam Ajax Control Toolkit si vom referentia controalele existente, aflate in AjaxControlToolkit-NoSource\SampleWebSite\Bin . Vom adauga un nou tab in ToolBox, ii vom zice AjaxControls si vom adauga itemii apasind pe Choose Items:

 

 

Si apoi indicind prin browse calea la AjaxControlToolkit.dll pe care l-am downloadat. Apasati pe urma OK si vom avea controalele Ajax.

Trageti un AutoCompleteExtender si un textbox in frmPublisherList.aspx .

 

Vom completa

public class wsPublisher : System.Web.Services.WebService {

cu atributul

[System.Web.Script.Services.ScriptService]

si vom adauga o metoda pentru regasirea publisher-ilor care incep cu o litera data:

 

[WebMethod]

public string[] GetCompletionPublishers(string prefixText, int count)

{

if (count <= 0)

count = 10;

 

List<string> items = new List<string>(count);

BookObjects.ColPublisher publishers = new BookObjects.ColPublisher();

publishers.Load();

foreach (BookObjects.Publisher pub in publishers)

{

if (pub.Name.IndexOf(prefixText, StringComparison.CurrentCultureIgnoreCase) == 0)

items.Add(pub.Name);

 

if (items.Count == count)

break;

}

return items.ToArray();

 

}

 

 

O vom folosi in Autocomplete:

<asp:ScriptManager runat="server">

</asp:ScriptManager>

<asp:TextBox ID="txtPub" runat="server" autocomplete="off"></asp:TextBox>

<cc1:AutoCompleteExtender ID="AutoPub" runat="server"

TargetControlID="txtPub"

ServicePath="wsPublisher.asmx"

ServiceMethod="GetCompletionPublishers"

MinimumPrefixLength="1"

CompletionInterval="1000"

EnableCaching="true"

CompletionSetCount="12">

</cc1:AutoCompleteExtender>

In momentul de fata putem testa aplicatia si vedea ca se listeaza numele publisher-ilor.

 

 

Lucruri de facut:

Creat o metoda prin care sa se poata incarca doar cei care au prefix, nu toti publisher-ii cum am facut in public string[] GetCompletionPublishers(string prefixText, int count)

De pus scriptManager-ul in Master- ca sa nu fim nevoiti sa il punem in fiecare pagina.

 

De vazut celelalte controale de la Ajax Control Toolkit (live demo la adresa http://ajax.asp.net/ajaxtoolkit/Default.aspx )

 

 

 

Data viitoare vom vorbi despre scoaterea de rapoarte .

 

 

 

Post page: http://serviciipeweb.ro/iafblog/2007/04/14/PROGRAMAREA+IN+NET+PARTEA+A+15A+OPERATII+ASINCRONE+IN+ASPNET+SI+AJAX.aspx

Weblog post by 'admin' on 'PROGRAMAREA IN .NET - PARTEA A 15-A OPERATII ASINCRONE IN ASP.NET SI AJAX'

Categories:programare;tutoriale

 
Acest blog s-a mutat la http://www.serviciipeweb.ro/iafblog/