protected void Page_PreInit(Object sender, EventArgs e)
{
PropertyInfo p = typeof(System.Web.HttpRuntime).GetProperty("FileChangesMonitor", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static);
object o = p.GetValue(null, null);
FieldInfo f = o.GetType().GetField("_dirMonSubdirs", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.IgnoreCase);
object monitor = f.GetValue(o);
MethodInfo m = monitor.GetType().GetMethod("StopMonitoring", BindingFlags.Instance | BindingFlags.NonPublic);
m.Invoke(monitor, new object[] { });
}
Use System.Reflection
Wednesday, November 26, 2008
Saturday, November 15, 2008
Game Links
http://www.janbrett.com/piggybacks/mouse_concentration.htm
http://www.mindexercisepuzzles.com/start.php
http://www.mindexercisepuzzles.com/start.php
Javascript Code to display Time
script language="javascript" type="text/javascript">
function startTime()
{
var AmPm;
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
// add a zero in front of numbers<10
AmPm=checkAmPm(h);
h=check12hrs(h);
m=checkTime(m);
s=checkTime(s);
document.getElementById('<%=lblTime.ClientID %>').innerHTML=h+":"+m+":"+s +""+AmPm;
t=setTimeout('startTime()',500);
}
function checkTime(i)
{
if (i<10)
{
i="0" + i;
}
return i;
}
// Check for 12 hrs
function check12hrs(hr)
{
if (hr>12)
{
hr=hr - 12;
}
return hr;
}
function checkAmPm(hr)
{
if (hr>12)
{
AmPm="PM"
}
else
{
AmPm="AM";
}
return AmPm;
}
// End Script
function startTime()
{
var AmPm;
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
// add a zero in front of numbers<10
AmPm=checkAmPm(h);
h=check12hrs(h);
m=checkTime(m);
s=checkTime(s);
document.getElementById('<%=lblTime.ClientID %>').innerHTML=h+":"+m+":"+s +""+AmPm;
t=setTimeout('startTime()',500);
}
function checkTime(i)
{
if (i<10)
{
i="0" + i;
}
return i;
}
// Check for 12 hrs
function check12hrs(hr)
{
if (hr>12)
{
hr=hr - 12;
}
return hr;
}
function checkAmPm(hr)
{
if (hr>12)
{
AmPm="PM"
}
else
{
AmPm="AM";
}
return AmPm;
}
// End Script
Thursday, November 13, 2008
How to Resize an Image?
Fit the Pic Script// Title
script language="Javascript"
var arrTemp=self.location.href.split("?");
var picUrl = (arrTemp.length>0)?arrTemp[1]:"";
var NS = (navigator.appName=="Netscape")?true:false;
function FitPic() {
iWidth = (NS)?window.innerWidth:document.body.clientWidth;
iHeight = (NS)?window.innerHeight:document.body.clientHeight;
iWidth = document.images[0].width - iWidth;
iHeight = document.images[0].height - iHeight;
window.resizeBy(iWidth, iHeight);
self.focus();
};
//script end
BODY bgcolor="#000000" onload='FitPic();' topmargin="0"
marginheight="0" leftmargin="0" marginwidth="0">
document.write( "
" );
script language="Javascript"
var arrTemp=self.location.href.split("?");
var picUrl = (arrTemp.length>0)?arrTemp[1]:"";
var NS = (navigator.appName=="Netscape")?true:false;
function FitPic() {
iWidth = (NS)?window.innerWidth:document.body.clientWidth;
iHeight = (NS)?window.innerHeight:document.body.clientHeight;
iWidth = document.images[0].width - iWidth;
iHeight = document.images[0].height - iHeight;
window.resizeBy(iWidth, iHeight);
self.focus();
};
//script end
BODY bgcolor="#000000" onload='FitPic();' topmargin="0"
marginheight="0" leftmargin="0" marginwidth="0">
document.write( "
Subscribe to:
Posts (Atom)
