Meat Raffles

Local meat raffle list

  • ACE’S MAIN TAP – 2nd Sunday of each month at 1pm
  • AL’S DAYTON PLACE – 3rd Sunday of each month at 2pm
  • DIVE INN – 3r Saturday of each month at Noon
  • DUTCH MILL – Every Saturday at 3pm
  • HEADQUARTERS – 1st Saturday of each month at 3pm
  • THE KEG – 2nd Sunday of each month at 2pm (during the winter)
  • MIKE’S HORSESHOE – 1st Sunday of each month at Noon
  • MORGAN’S – Every Saturday at 1pm
  • MOUNT VERNON TAP – 1s Sunday of each month at 3pm
  • OLE DUFFER’S – 2nd Sunday of each month at 3pm
  • PARKSIDE PUB – Every Sunday at 2pm
  • R BAR – 1st Saturday of each month at 2pm (during the winter)
  • THE RANCH SALOON
    • Meat Raffle: 2nd Saturday of each month at 2pm
    • Cheese Raffle: 4th Saturday of each month at 2pm (during the winter)
  • THE RED MOUSE – Every Sunday’s at 1-4pm
  • SUGAR RIVER LANES – During Packer and Badger Football Games
  • SUNDOWN SALOON – Every Monday at 6pm
  • TAILGATERS – Sunday’s at 2pm (during the winter)
  • TULLY’S II – Every Saturday at 3pm
  • VFW 6905 – Every Friday at 5:00pm (October – April)
  • VFW 7591 – 4th Monday of each month at 5:30pm
  • VFW 8483 – 1st Saturday and 3rd Saturday of each month at 1pm
  • VILLA TAP – Every Saturday at 3pm
Meat Raffles

Displaying Assembly Version Information

On a lot of my websites, I find it very useful to know exactly what version I’m working with.  Not only the version number, but also whether or not it’s running in RELEASE or DEBUG mode.

To accomplish this, it’s a fairly simple process.  Just put a Label control on your webform and then set the text property of it.  Here’s some sample code.

 Continue reading "Displaying Assembly Version Information" 
Displaying Assembly Version Information

Splitting a large text file into manageable pieces

Have you ever gotten a gigantic text file that you needed to split into smaller chunks?  Maybe you have a gigantic log file you can’t even open or some source data in a text file that would be better suited to being processed as a series of smaller files rather than one big file.  How can you split that file into a series of smaller files?

Continue reading “Splitting a large text file into manageable pieces”

Splitting a large text file into manageable pieces

Public/Private key problems

Lately, I’ve been working on a project that has some pretty heavy duty encryption requirements.  This stuff is very cool, but somewhat mysterious.  I have run into these two errors and couldn’t really find a good description of what they are or more importantly, how to fix them.


Input too large for rsa cipher

and


Unknown block type

The problem is that without the code changing at all these two errors pop up all the time but very randomly. Continue reading “Public/Private key problems”

Public/Private key problems

Pausing to catch your breath in C#

Sometimes in your code, you find the need to try an operation that’s dependent upon some other system.  That other system might be a little laggy.  As such, you want to try your operation and then pause a moment or two before you try again.  A simple way to do this is with

Thread.Sleep(1000);

That little snippet of code will wait for one second and then continue.  There’s a better way though…

Continue reading “Pausing to catch your breath in C#”

Pausing to catch your breath in C#

WebAPI – Accepting both form data and query string parameters

Recently, I had to write a WebAPI method in C# that would be an HTTP POST.  Basically, I wanted to hit

http://localhost:99/api-demo/samplemethod/myIdString

and pass a bunch of data in the body of the request. Simple, no?

In our project, we make heavy use of the Route attribute to decouple the method name from the URL.  My method looked okay.

    [RoutePrefix("api-demo")]
    [SetUser]
    public class DemoController : ApiController
    {
        [HttpPost]
        [Route("samplemethod")]
        public IHttpActionResult Sample([FromBody] string requestBody, string id)
        {
            return Ok(String.Format("Request with ID {0} body has a length of {1}", id, requestBody.Length));
        }
    }

This sample code is clearly very simple.  I have decoupled the controller to api-demo and the method to samplemethod. It appears like everything would work as expected, however when I would test it via POSTMAN, I get the following response:

{
  "$id": "1",
  "Message": "No HTTP resource was found that matches the request URI 'http://localhost:99/api-demo/samplemethod/1134630'.",
  "MessageDetail": "No type was found that matches the controller named 'api-demo'."
}

Continue reading “WebAPI – Accepting both form data and query string parameters”

WebAPI – Accepting both form data and query string parameters

Performance – Using Try/Catch

I just wrote the stupidest program ever.  It is inefficient by design.  If anyone did this thinking “hey… this is great code” they should be fired.

Anyway… generally speaking, using try/catch blocks is not a great idea.  There are a myriad of reasons but it’s usually something along the lines of:

If you truly have an unexpected error it’s better to let the program crash and then fix the bug.

If you do have to use the try/catch exception handling block, you should only catch explicit exceptions.  For example catch a file access exception or a database invalid primary key exception.  Just catching the generic exception is poor practice.

There’s another reason to avoid try/catch though… it is a performance hog.

Continue reading “Performance – Using Try/Catch”

Performance – Using Try/Catch

A little tidbit about MD5 Checksums

Checksums are handy. According to Wikipedia:

A checksum or hash sum is a small-size datum from a block of digital data for the purpose of detecting errors which may have been introduced during its transmission or storage.

We find ourselves using checksums to verify that the file a developer has created is the same as what has been deployed.

Continue reading “A little tidbit about MD5 Checksums”

A little tidbit about MD5 Checksums

Performance – Inline SQL vs Parameterized Queries

In the search for better and better performance, there are many techniques developers can use.  A technique used early on by some entry level or “still learning” developers is to build inline SQL.  That looks something like this:

string name = "Mark";
string query = "SELECT * FROM users WHERE FirstName='" + name + "'";
OleDbCommand cmd = new OleDbCommand(query);
OleDbDataReader reader = cmd.ExecuteReader();

There are steps missing… this is just example code

 

This is something more seasoned developers learn to avoid almost immediately.  There’s a variety of reasons why inline SQL is bad.  The most important reason is security.

However, there’s another reason to avoid it.  Performance.

Continue reading “Performance – Inline SQL vs Parameterized Queries”

Performance – Inline SQL vs Parameterized Queries