24. February 2012 18:04by JP Hellemons in
C#, WinForms
Scrabble is funny, and to play it with friends even more. Especially because you can spread the game throughout your day. But I am a coder, I like math more than words. So to keep up with this Wordfeud trend, I need help. So why not code a helper?
[More]Share or Bookmark this post…
3. October 2011 05:44by JP Hellemons in
C#
Today I had a DataTable object with the top x rows of a query. select top 23 * from products
So my Asp.Net C# code looked like this:
private void SampleMethod(int toShow)
{
string sql = "SELECT top " + toShow + " * from products";
SqlCommand com = new SqlCommand(sql);
DataTable dt = dal.GetDataTable(com);
if (dt.Rows.Count > 0)
{
var a = dt.AsEnumerable().Where(
p => p.Field<int>("stock") > p.Field<int>("ProductMinStock"))
DataList2.DataSource = a;
DataList2.DataBind();
}
}
This crashed as you might have noticed. The error was:
More...10. June 2011 20:44by JP Hellemons in
C#
As you can read in the blogpost about access jpg’s through ftp with asp.net. I have explained there how I connected with FTP and retrieved images of the IP security camera. Now I have slightly modified the LINQ so that it downloads the latest 3 images and I would like to animate the transition between them. Now I know that I can use some fancy jQuery for image transitions, but I would like to merge the three images in a Gif. Here is how I have accomplished it with Asp.Net C#
More...