Press Play
Friday, March 7, 2014
Silhouette Oracle
You can pick between Yes/No, Tarot, Runes and I ching and ask any question. You will then get an answer back.
http://www.silhouetteoracles.com/
Whether the answer is the right one or the wrong one, that is up to you to decide.
Do you believe in oracles?
M
Thursday, March 6, 2014
Cookie Clicker
I would like to introduce you to Cookie Clicker. This game has single handed brought down the productivity of companies all around the world. It is an OCD nightmare. It starts off small, but before you know, you've lost hours, days or even weeks.
http://orteil.dashnet.org/cookieclicker/
The point of the game is to click cookies. You can buy "add-ons", like grand mothers to help you produce cookies without clicking cookies yourself. The more you buy, the more expensive the items get. You reach a point where cookies and Grandmother run the world. It all sounds mundane, but believe me, it is hard to stop clicking, not to try and get all of the achievements. If you are an achievement addict, this is the game that will ruin your life.
Many websites and applications have been dedicated to Cookie Clicker. One application used is http://sourceforge.net/projects/hf-auto-clicker/, that clicks on your behalf. And the popular cheating website http://cookieclicker.wikia.com/wiki/Cheating.
Enjoy!
M
Wednesday, February 9, 2011
WCF Datatable, connection was closed and exception was thrown.
At the current time of writing I'am working on a project using the .net 3.5 sp1 Framework.
I encountered a strange error while trying to return a DataTable from a webservice using WCF. If the DataTable is initialized with the default constructor and no parameters are given then WCF cant serialize to object and return it to the client, the error thrown will look something like this:
An error occurred while receiving the HTTP response to *SERVICENAME* . This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.
Luckly the work around is easy :
just initialize the DataTable with the constructor where you specify a tableName, and then walla, the serialization works :)
Alternatively you can added the DataTable to a DataSet and return that to the client.
Happy Programming
Tuesday, January 25, 2011
wpftoolkit datepicker infinite loop and lost focus issue
Thursday, December 30, 2010
Usher Stole OMG from Homer Simpson?
Tuesday, December 28, 2010
Alone at work
Hope you are all enjoying the holidays.
Friday, December 24, 2010
Books for Christmas??
Friday, December 10, 2010
Rounding up (Ceiling) Days and Months in a DateTimeRange C#
If you are pulling a report and you want to calculate a partial month as one month, this is how you would calculate it:
private Int32 GetMonthCountFromDateTimeRange(DateTimeRange oDateTimeRange)
{
DateTime endDate = oDateTimeRange.Stop ?? DateTime.Now;
int numMonths = (endDate.Month - oDateTimeRange.Start.Value.Month) +
(12 * (endDate.Year - oDateTimeRange.Start.Value.Year));
TimeSpan tsDifference = endDate - oDateTimeRange.Start.Value;
if (tsDifference.TotalDays > 0)
{
return numMonths + 1;
}
else
{
return numMonths;
}
}
If you are pulling a report and you want to calculate a partial day as one day, this is how you would calculate it
private Int32 GetDayCountFromDateTimeRange(DateTimeRange oDateTimeRange)
{
DateTime endDate = oDateTimeRange.Stop ?? DateTime.Now;
TimeSpan tsDifference = endDate - oDateTimeRange.Start.Value;
return Convert.ToInt32(Math.Ceiling(tsDifference.TotalDays));
}
Hope this helps.
M