In case that site goes down here's how to do it on my Win7 machine:
- Open the cmd line in admin mode
- net use \\[server] /USER:[login] "[password]"
- query session /server:[server]
- reset session [id from above] /server:[server]
SOFTWARE DEVELOPER IN ATLANTA
by Jerry Pattenaude
if (!File.Exists("nh.cfg"))
{
// Build your nh configuration
Configuration configuration = new Configuration()
.Configure("NHibernate.config");
// write the config out to a file (the configuration is expensive to create)
new BinaryFormatter().Serialize(File.Create("nh.cfg"), configuration);
}
var configuration = (Configuration)new BinaryFormatter().Deserialize(
File.Open("nh.cfg", FileMode.Open)
);
ISessionFactory factory = configuration.BuildSessionFactory();
public class PainIsWeaknessLeavingTheBody: EmptyInterceptor
{
public override SqlString OnPrepareStatement(SqlString sql)
{
// check for too many queries
var count = (int)(HttpContext.Current.Items["nh_statment_count"] ?? 0)
if (++count > 30)
throw new InvalidOperationException("Stop querying the DB, dummy!");
HttpContext.Current.Items["nh_statment_count"] = count;
// add a sql delay
return new SqlString("WAITFOR DELAY '00:00:01'\r\n").append(sql);
}
}
I've been trying to do this for a little while now. I wasn't so sure about this at first but the more and more I do it the better I like it.I recently imposed on myself the constraint of coding without comments. Why?
- Comments rust faster than code, even when you’re careful
- Well written code can be read, and comments are annoying footnotes
- Comments make for lazy coding
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js' type='text/javascript'></script>
<script type='text/javascript'>
$("a[href^=http://]").not("a[href^=http://www.yourdomain]").attr("target", "blank");
</script>
javascript:(function(){alert('hey there')})()
javascript:(function(){alert(document.getElementById('nav').innerHTML)})()
dir /ad /b /sdir /a-d /b /s
(function(method)
{
var rexp = new RegExp(
"^" +
"(?:" + // date
"(1[0-2]|0?[1-9])" + // Month
"[/-]" +
"(3[0,1]|[1,2][0-9]|0?[1-9])" + // Day
"(?:[/-]" +
"(19[7-9][0-9]|2[0-9]{3}|[0-9]{2})" + // Year
")?" +
"\\s?" +
")?" +
"(?:" + // Time
"(2[0-3]|1[0-9]|[1-9])" + // Hour
"(?:[:]" +
"([0-5][0-9])" + // Min
"(?:[:]" +
"([0-5][0-9])" + // Sec
")?" +
")?" +
"\\s?" +
"(?:([aApP])[mM]?)?" + // ampm
")?$"
);
var i = { Month: 1, Day: 2, Year: 3, Hour: 4, Min: 5, Sec: 6, AMPM: 7 };
var trim = function(s) { return s.replace(/^\s+|\s+$/g, ''); };
if (Date[method]) throw method + " already exists on the date object.";
Date[method] = function(strDate)//, optFormat)
{
strDate = trim(strDate);
var parsed = rexp.exec(strDate);
if (!strDate || !parsed) { return null; }
var ret = new Date(); // could also pass in a context date
var year = ret.getFullYear();
if (parsed[i.Year])
{
switch (parsed[i.Year].length)
{
case 4:
year = parseInt(parsed[i.Year], 10);
break;
case 2:
year = year - (year % 100) + parseInt(parsed[i.Year], 10);
break;
}
}
var month = (parsed[i.Month] ? parseInt(parsed[i.Month], 10) - 1 : ret.getMonth());
var day = (parsed[i.Day] ? parseInt(parsed[i.Day], 10) : ret.getDate());
var hour = (parsed[i.Hour] ? parseInt(parsed[i.Hour], 10) : 0);
var min = (parsed[i.Min] ? parseInt(parsed[i.Min], 10) : 0);
var sec = (parsed[i.Sec] ? parseInt(parsed[i.Sec], 10) : 0);
var ms = 0;
ret.setFullYear(year, month, day);
ret.setHours(hour, min, sec, ms);
if (!parsed[i.AMPM]) { return ret; }
if (hour > 12 && parsed[i.AMPM].toLowerCase() === 'p')
{
ret.setHours(ret.getHours() + 12);
}
else if (hour === 12 && parsed[i.AMPM].toLowerCase() === 'a')
{
ret.setHours(ret.getHours() - 12);
}
return ret;
};
})('parseDate');function test(str)
{
document.write("<tr><td>(" + str + ")</td><td>" + Date.parseDate(str) + "</td></tr>");
}
document.write("<table>");
test("1/13");
test("1/13/1999");
test("1/13/2001");
test("1/13/99");
test("1/13/01");
test("4/5/2008 2:00:06 pm");
test("11/5/2008 2:00 pm");
test("4/5/2008 2 pm");
test("4/5/2008");
test("4/5");
test("2:00:00");
test("4:00am");
test("4 am");
test("3p");
test("12:00");
test("22:59");
test("1:59");
test("12:45 a");
test("3");
test("19");
test("4p");
test("5 p");
test("12/26/2008");
test("1/2/08");
test("1/2");
test("1/03");
test("01/03");
test("01/13/2008");
test("1/2 2p");
test(" 2 ");
test(" 2 ");
test("01-13-2008");
test("1-2 2p");
test("FAIL CASES:");
test("");
test(" ");
test("24");
test("24 pm");
test("36:00");
test("1:60");
test("13/02");
test("2008/13/02");
document.write("</table>");(1/13) Tue Jan 13 2009 00:00:00 GMT-0500 (Eastern Standard Time) (1/13/1999) Wed Jan 13 1999 00:00:00 GMT-0500 (Eastern Standard Time) (1/13/2001) Sat Jan 13 2001 00:00:00 GMT-0500 (Eastern Standard Time) (1/13/99) Tue Jan 13 2099 00:00:00 GMT-0500 (Eastern Standard Time) (1/13/01) Sat Jan 13 2001 00:00:00 GMT-0500 (Eastern Standard Time) (4/5/2008 2:00:06 pm) Sat Apr 05 2008 14:00:06 GMT-0400 (Eastern Daylight Time) (11/5/2008 2:00 pm) Wed Nov 05 2008 14:00:00 GMT-0500 (Eastern Standard Time) (4/5/2008 2 pm) Sat Apr 05 2008 14:00:00 GMT-0400 (Eastern Daylight Time) (4/5/2008) Sat Apr 05 2008 00:00:00 GMT-0400 (Eastern Daylight Time) (4/5) Sun Apr 05 2009 00:00:00 GMT-0400 (Eastern Daylight Time) (2:00:00) Wed Jul 29 2009 02:00:00 GMT-0400 (Eastern Daylight Time) (4:00am) Wed Jul 29 2009 04:00:00 GMT-0400 (Eastern Daylight Time) (4 am) Wed Jul 29 2009 04:00:00 GMT-0400 (Eastern Daylight Time) (3p) Wed Jul 29 2009 15:00:00 GMT-0400 (Eastern Daylight Time) (12:00) Wed Jul 29 2009 12:00:00 GMT-0400 (Eastern Daylight Time) (22:59) Wed Jul 29 2009 22:59:00 GMT-0400 (Eastern Daylight Time) (1:59) Wed Jul 29 2009 01:59:00 GMT-0400 (Eastern Daylight Time) (12:45 a) Wed Jul 29 2009 00:45:00 GMT-0400 (Eastern Daylight Time) (3) Wed Jul 29 2009 03:00:00 GMT-0400 (Eastern Daylight Time) (19) Wed Jul 29 2009 19:00:00 GMT-0400 (Eastern Daylight Time) (4p) Wed Jul 29 2009 16:00:00 GMT-0400 (Eastern Daylight Time) (5 p) Wed Jul 29 2009 17:00:00 GMT-0400 (Eastern Daylight Time) (12/26/2008) Fri Dec 26 2008 00:00:00 GMT-0500 (Eastern Standard Time) (1/2/08) Wed Jan 02 2008 00:00:00 GMT-0500 (Eastern Standard Time) (1/2) Fri Jan 02 2009 00:00:00 GMT-0500 (Eastern Standard Time) (1/03) Sat Jan 03 2009 00:00:00 GMT-0500 (Eastern Standard Time) (01/03) Sat Jan 03 2009 00:00:00 GMT-0500 (Eastern Standard Time) (01/13/2008) Sun Jan 13 2008 00:00:00 GMT-0500 (Eastern Standard Time) (1/2 2p) Fri Jan 02 2009 14:00:00 GMT-0500 (Eastern Standard Time) ( 2 ) Wed Jul 29 2009 02:00:00 GMT-0400 (Eastern Daylight Time) ( 2 ) Wed Jul 29 2009 02:00:00 GMT-0400 (Eastern Daylight Time) (01-13-2008) Sun Jan 13 2008 00:00:00 GMT-0500 (Eastern Standard Time) (1-2 2p) Fri Jan 02 2009 14:00:00 GMT-0500 (Eastern Standard Time) (FAIL CASES:) null () null ( ) null (24) null (24 pm) null (36:00) null (1:60) null (13/02) null (2008/13/02) null
var str="http://www.google.com?q=blah&vv=ha&test&nah=yeah"; // window.location.href
var regex = /[?&]([^=&]*)(?:=([^&]*))?/g;
var res, params = {};
while ((res = regex.exec(str)) != null)
{
params[res[1]] = res[2] || "n/a";
}
for (a in params)
{
document.write(a + "=" + params[a] + "<br/>");
}
q=blah
vv=ha
test=n/a
nah=yeah
defrag c: -adefrag c: -v
When I got the new diff tool with Team Foundation Server and VS 2005 & 8 I though it was pretty good... Until I realized that there were no configuration items on the UI. I loved the ignore spaces option, so I didn't have to see lines that were spaced differently. Today I found a great post on the command line options for TF.exe (the TFS command line tool). Real TFS Command Line Help One of the options is to ignorespace. There's also an ignoreeol.Extensions: .*
Operation: Compare
Command: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\diffmerge.exe
Arguments: %1 %2 /ignorespace /ignoreeol
"<a href=.....>Some Text</a>".replace(/<a[^>]*>([^<]*)<\/a>/gi, "$1");for %a in (*.js) do ECHO %a is a javascript file
As you can see the style I chose was to just add a black background with white text when the day % 3 == 0.

AjaxControlToolkit.CalendarBehavior.prototype = {
[...]
_getCssClass : function(date, part) {
/// <summary>
/// Gets the cssClass to apply to a cell based on a supplied date
/// </summary>
/// <param type="Date" name="date">The date to match</param>
/// <param type="String" name="part">The most significant part of the date to test</param>
/// <returns type="String">
if (this._isSelected(date, part)) {
return "ajax__calendar_active";
} else if (this._isOther(date, part)) {
return "ajax__calendar_other";
} else {
return "";
}
}
[...]
}Sys.Application.add_load(InitCalendars);
function InitCalendars()
{
AjaxControlToolkit.CalendarBehavior.prototype._getCssClass =
function(date, part) {
[Your updated code here]
}
}
$find('the behavior id you assigned')._getCssClass =
function(date, part) {
[Your updated code here]
}I read a lot about the pc before I got it. I wasn't worried about complaints of a loud cd/dvd drive (It's not that loud). The computer definitely gets hot on your lap. Years ago I once asked a dell support person why they call it a laptop if it can't be used on your lap. I was quickly corrected... These are "notebooks". Yes it does get hot. I also prefer the different inputs to be on the back of the laptop, but I've found the side access okay for my usb mouse and the power cord.
Overall I think the only regret may be getting Vista. SP1 should be out any day now, but I don't think Vista will be able to compete with XPs stability.
If it means anything to you my Vista Windows Experience Index is a 4.8 which is pretty good for today's computers