January (2012)
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
293031

February (2012)
S M T W T F S
   1234
567891011
12131415161718
19202122232425
262728

Computers

  The following Weblog items are filed under the Computers category. There are 73 entries in this section. The earliest was published on October 18, 2010 and the latest entry was filed on December 20, 2010. If you have any comments about Computers please let me know!

Pages:123456789101112131415

December 20, 2010
FreeLotto Anniversary

Today is my 10 year anniversary for joining FreeLotto. I don't think I have visited the site once in the past 9 years:

Dear Sir,
You are receiving this message because you joined FreeLotto on 2000-12-20 16:28:24, from IP Address 204.245.80.70. When you registered you agreed to receive messages from FreeLotto. FreeLotto NEVER sends JUNK or SPAM messages. We never send mail to anyone unless they requested it when they registered. If you somehow didn't understand that you were agreeing to receive messages from us at the time you joined PLEASE CLICK HERE TO BE PERMANENTLY REMOVED FROM OUR LIST. In doing so you will also cancel your FreeLotto membership and you will no longer be eligible to play FreeLotto or receive up to $11,000,000.00 in daily prizes. We regret any inconvenience.
Thank you,
FreeLotto Member Services


I wonder if they will even let me know that it has been ten years. Maybe I should unsubscribe now?

 Redbullet Filed under the "Computers" category. The direct link to this blog entry is here.

December 16, 2010
SQL Server Date Query

Here are some simple mssql queries if you need to change the current date in a query. That is if you need to find information in the past and don't want to hard code in values.

Yesterday:
SELECT GETDATE(), DATEADD(day, -1, GETDATE());

Seven Days ago:
SELECT GETDATE(), DATEADD(day, -7, GETDATE());

Last Year:
SELECT GETDATE(), DATEADD(year, -1, GETDATE());

Last Hour:
SELECT GETDATE(), DATEADD(hour, -1, GETDATE());

More specifically you would do something like this:

Show all sales within the past hour:
Select * from orders where
salesdate > DATEADD(hour, -1, GETDATE())

 Redbullet Filed under the "Computers" category. The direct link to this blog entry is here.

October 20, 2010
WebAii Validate Current URL

Using Webaii, Use this code snip to validate the URL of the current page:

// Validate URL
StringAssert.Contains(ActiveBrowser.Url, "dev");

// URL Does Not Contain
Assert.IsFalse(ActiveBrowser.Url.Contains("index.jsp"));

 

 Redbullet Filed under the "Computers" category. The direct link to this blog entry is here.

October 19, 2010
WebAii InnerMarkup

Using WebAii and this code snip to search the HTML source of a page for some data:

// Check for value of a InnerMarkup
string TextString = ActiveBrowser.Find.ByAttributes("id=content").InnerMarkup.ToString();
StringAssert.Contains(TextString, "Company Name");

 Redbullet Filed under the "Computers" category. The direct link to this blog entry is here.

October 18, 2010
Webaii Finding Images

Using Webaii, here's how to validate that an image is loading correctly on a page:

// Validate Image on Page
Assert.IsNotNull(Find.ByAttributes<HtmlImage>("src=~logo.gif"), "Logo Image is not on the page");

Very useful to have as a code snip.

 Redbullet Filed under the "Computers" category. The direct link to this blog entry is here.

Pages:123456789101112131415