Thursday, November 30, 2006

2 Anni di tata


Come promesso ho editato il post...... sono state 2 settimane incasinatissime, finalmente questo weekend andrò via con il mio cucciolo e passeremo un weekend a San Remo mooolto romantico :P

Ora tata si sta preparando ( siamo già in ritardo....), meglio cosi navigo un po :P

Ah....... mi stavo quasi dimenticando, bacio Amore!

Tuesday, November 21, 2006

I want more!!!!

.... non è il famoso detto di madonna, tanto meno un mio grido per avere un numero maggiore di patate, bensi è quello che sta chiedendo il mio nuovo portatile (Acer 5685, Core 2 duo 2.0Ghz con 4MB di cache, 2 GB di ram e 160GB di HD SATA) dopo aver installato VM Ware e 3 macchine virtuali con sopra Windows 2003 Server... domani se avrò tempo proverò assieme a Mario a promuovere il server SQL ad Active Directory in modo tale da togliere una macchina virtuale, magari riesco a recuperare 256mb di ram.... potrei chiedere a babbo natale 4GB di ram per notebook, 1200€ di regalo!

Se ti avessi fra le mie mani ti distruggerei.........

..........maledettissima PS3

Friday, November 17, 2006

Prova Flickr....

sto cercando uno spazio per hostare le immagini... chissà se flickr supporta il linking esterno.......boh proviamo :P
















Si funziona, fantastico!

Thursday, November 16, 2006

Italians do it better...

Some days ago me and my Project Leader Mario have been invoiced of find the reason of IIS's Error 500 on a web application we're testing.
This error came out only under web application's stress test and it was really strange... Error 500 is a Server Error and we were thinking about MSSQL connection pool, IIS parameters and so on.
On last try we installed a packet sniffer (WireShark, old Ethereal) and monitoring we find that under some cirumstance MSSQL server won't read a data from DB.
Stepping throught the code, we found this :

Public Shared Function getUnionLogo(ByVal intUnionID As Int32) As Byte()

Dim strConn As String

Dim parms(0) As SqlParameter

Dim dr As SqlDataReader

Dim lngImageLength As Long

Dim ImageArray As Byte()


parms(0) = New SqlParameter("@UnionID", SqlDbType.Int)

parms(0).Value = intUnionID


strConn = Common.GetConfigSettings("ConnectionString_Apps")


Try

dr = SqlHelper.ExecuteReader(strConn, "usp_GetUnionLogo", parms)


If dr.Read Then

lngImageLength = dr.GetBytes(0, 0, Nothing, 0, Integer.MaxValue)

ReDim ImageArray(lngImageLength)

dr.GetBytes(0, 0, ImageArray, 0, Convert.ToInt32(lngImageLength))

dr.Close()

End If

Catch y As SqlException

End Try


Return ImageArray


End Function


As I've mentioned above, on some circumstances, this function screw up and it's due to this :

They declare Dim ImageArray As Byte() but they redim it (VB is really a freaky language....wtf u redim....) into try{} catch{} statement without considering that the GetBytes above may fail.. if this happens the function returns ImageArray as a null pointer, excuse me nothing pointer (I have VB more and more each time I use it, first WHY don't use bratchets and ;???)

We've fixed it and here's our solution..

Public Shared Function getUnionLogo(ByVal intUnionID As Int32) As Byte()

Dim strConn As String

Dim parms(0) As SqlParameter

Dim dr As SqlDataReader

Dim lngImageLength As Long

Dim ImageArray(0) As Byte

parms(0) = New SqlParameter("@UnionID", SqlDbType.Int)

parms(0).Value = intUnionID

strConn = Common.GetConfigSettings("ConnectionString_Apps")

Try

dr = SqlHelper.ExecuteReader(strConn, "usp_GetUnionLogo", parms)

If dr.Read Then

'lngImageLength = dr.GetBytes(0, 0, Nothing, 0, Integer.MaxValue)

lngImageLength = dr.GetInt32(1) 'I read logo datalenght

If lngImageLength > 0 Then

ReDim ImageArray(lngImageLength - 1)

dr.GetBytes(0, 0, ImageArray, 0, lngImageLength)

End If

End If

dr.Close()

Catch y As SqlException

ReDim ImageArray(1)

End Try

Return ImageArray

For doing this, we've added into the store procedure on MSSQL a function to get image lenght....

there're many many errors on this solution and we'll try to catch{} and fix{} as much as possible!

Italian do it better.........remember it!

Friday, November 10, 2006

I numeri parlano molto chiaro.....

Che noi programmatori fossimo dei depravati, si sapeva da tempo..... ma i numeri parlano molto chiaro :































Internet Porn Statistics
Daily pornographic e-mails2.5 billion
Average daily porn e-mails per user4.5
Monthly peer-to-peer porn downloads1.5 billion
Men accessing porn at work20%
Women accessing porn at work13%
Adults admitting to Internet sex addiction10%
Source: Internet Filter Review
Fonte presa da :
http://siliconvalley.internet.com/news/article.php/3083001

Sunday, November 05, 2006

Aggiornamento....

Mamma mia, è un pò di tempo che non scrivo....... vedrò di fare un riassunto il più veloce possibile, sabato scorso ho fatto la risonanza magnetica per il mio ginocchio e come sospettavo, il mio legamento crociato anteriore si è lacerato completamente...
la buona notizia è che non devo essere operato perchè per questo tipo di lesioni, non operano più, ma semplicemente fare riabilitazione... vedremo... per adesso colgo il meglio dalla situazione (le fanciulle mi cedono gentilmente il posto sull' autobus, posso uscire 10 minuti prima da lavoro per prendere il treno, Tata non mi picchia più come prima perchè ha paura di farmi male e altre piccole cose...)