File Copy Class with Buffer Support (HOT)
Well, i saw all the submissions on FILE copy, and i decided to share my buffered copy class. Worth a look if you are looking for a screamming fast file copy (excells on large files and floppy disk access - physical reasons:), oh, and before i forget... it has PERCENTAGEREADY support... u can update a label or a progress bar with it.
AI
AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Source Code
Upload
Here is the VBScript Sample
----------------------------------------------
function GetLastDay( month, year )
month = month + 1
if month > 12 then
month = month - 12
year = year + 1
end if
Dim x
x = DateAdd("d", -1, month&"/01/"&year)
GetLastDay = Day( x )
end function
Response.Write GetLastDay( 3, 1999 )&"<br>"
Response.Write GetLastDay( 2, 1999 )&"<br>"
Response.Write GetLastDay( 2, 2000 )&"<br>"
----------------------------------------------
Here is the JavaScript Sample
----------------------------------------------
function GetLastDay( month, year )
{
month++;
if( month > 12 )
{
month -= 12;
year++;
}
var x = new Date( month+"/1/"+year );
x = new Date( x.valueOf()-(1000*60*60*24) );
//1000*60*60*24=number of millisecs in 1 day
return x.getDate();
}
Response.Write( GetLastDay( 3, 1999 )+"<br>" );
Response.Write( GetLastDay( 2, 1999 )+"<br>" );
Response.Write( GetLastDay( 2, 2000 )+"<br>" );
Original Comments (3)
Recovered from Wayback Machine