Monday, January 5, 2009

Clear Mucus When I Should Be Having My Period?

ASP - Check if a date is between two dates

redone FUNCTION - THIS FUNCTION IS 'OLD
Look at that new

Need to check if a date is between two dates?
Since there is no ASP function to do this here's a home-made!

\u0026lt;%
checkZerosDate function (num)
if len (num) = 1 then
checkZerosDate = "0" & \u200b\u200bnum = num
else
checkZerosDate
end if
end function

Function dateBetween(data1,data2,data)
dim ndata1,ndata2,ndata

'controllo che siano date
if isdate(data1) and isdate(data2) and isdate(data) then
ndata1=year(data1) & checkZerosDate(month(data1)) & checkZerosDate(day(data1))
ndata2=year(data2) & checkZerosDate(month(data2)) & checkZerosDate(day(data2))
ndata=year(data) & checkZerosDate(month(data)) & checkZerosDate(day(data))
if (ndata1<=ndata) and (ndata<=ndata2) then
dateBetween = true else

dateBetween
= false end if else

'if you are not given returns false
dateBetween
= false end if end function

%>


As you can see the main function is "dateBetween" which must be passed as parameters:
  • data1: start date range
  • data2 : end date range
  • date: date from test
If no valid dates of the past function returns the Boolean value false

La funzione restituirà il valore booleano True se data è compresa tra data1 e data2 oppure False se non lo è.

Per funzionare questa funzione si deve appoggiare alla funzione checkZerosDate che non fa altro che formattare i valori a una cifra del giorno/mese in uno a due cifre!

Come sempre non può mancare lo zippo con lo script e un esempio !

Stop! :D
FUNZIONE RIFATTA - QUESTA FUNZIONE E' VECCHIA
Guarda quella nuova



Saturday, January 3, 2009

Mortgage Referall Cards

JAVASCRIPT - HtmlEncode

And here I may have found (in most tested and correct) a simple function to do the ' HtmlEncode (ASP function) client-side! It was about time! : D

This is a small javascript that you insert in your pages!

I tested (and changed where you had problems) this script with the following browsers: Microsoft Internet Explorer
  • 6.7
  • Mozilla Firefox 3
  • Opera Google Chrome Apple Safari


function is as follows:



\u0026lt;script type="text/javascript"> \u0026lt;! -
HTMLEncode function (str) {
was p = document.createElement ('div');
was text = document.createTextNode (str);
div.appendChild (text);
text = div.innerHTML;
text.replace text = (/ "/ g, """);

/ / Easier accentate -------------

text = text.replace (/ à / g, "à") ;
text = text.replace (/ è / g, "è");
text = text.replace (/ é / g, "é");
text = text.replace (/ ì / g, "ì");
text = text.replace (/ ù / g, "ù");
text.replace text = (/ o / g, "ò");

//-------------------------
//------- ------- ------- Fix Safari problem
text.replace text = (/ \u0026lt;/ g, "<");
text text.replace = (/> / g, ">");
//---------------------------- ----
return text;}


//--> \u0026lt;/ script>

Just call it and pass as parameter the text you want to do the encode. The function returns the encrypted text!

For now I noticed that not all special characters are supported! For example, the symbol grades -> ° that remains (in my car with my settings), while the ASP HtmlEncode ° translates it into (or ° depending on the settings of the server)!! In short, you can not have everything in life but broadly it may already be enough! : D
If someone wants to stand there and can try them all!

Who is invited to experience problems should report them in a comment on this post that maybe we can try to fixarli! ;)

the prox!

Thursday, January 1, 2009

Magnum Research Airsoft Gold

FIREFOX - Try Scribefire

This is a test of ScribeFire (formerly Performancing)

try .....


\u0026lt;
% response.write ("Test of an ASP code)
%>



Bold Italic Underline



Image Link:

Test failed. Error loading on the blog. Could I rely on my site but ...
'll see!

Well ... is a beautiful storiaccia! Very cute and improved since the last time I tried!!

Wednesday, December 31, 2008

Varicose Veins Ceragem

ASP - Calculate the day Easter

In this post I will show how to calculate the day of the Passover from a year ago.

This is a very simple ASP function which spend a year or a date.

function is this:


\u0026lt;%
'script for the calculation of Easter
' Author: Mark Brunelli - www.giuba.it
calcolapasqua function (date)
dim X, A, B, C, D, E, F, G, H, M, J, K, L, N, P, Pday
if IsDate (date) then
'if I had a date
X = year (date)

else' if I spent a number
X=data
    end if
    'calcolo la pasqua
    A=X mod 19
    B= int(X/100)
    C=X mod 100
    D=int(B/4)
    E=B mod 4
    G=int((8*B+13)/25)
    H=(19*A+B-D-G+15)mod 30
    M=int((A+11*H)/319)
    J=int(C/4) K=C mod 4
    L=(2*E+2*J-K-H+M+32) mod 7
    N=int((H-M+L+90)/25)
    P = (H + L-M + N +19) mod 32
Pday = P & "/" & N & "/" & X
calcolapasqua = FormatDateTime (Pday, 1)

end function%> ;


Just pass the function a year (positive integer) or date and this will "shoot out" the day of the Passover!
If you do not want to see the day (Sunday) as a result of the function, put this in the penultimate line

calcolapasqua = FormatDateTime (Pday)

instead of

calcolapasqua = FormatDateTime (Pday, 1)


Or look for a guide to the asp function 'FormatDateTime'!

Attention to pass correct values \u200b\u200bto the function. This time I did not do error checking!

as usual for the lazy links or zippino with the script already!