Simple Chili Powder

clock April 14, 2009 06:18 by author csmith12

How many times have your ran out of chili powder, or wanted to make chili but then had to go to the market and choose from 100+ types... Boo I say, make your own, it's super simple.

Mild/Medium Chili Powder

  • 3 tbsp paprika
  • 2 tbsp dried oregano
  • 1 tsp cayenne pepper
  • 1/2 tsp garlic powder
  • 1 tbsp salt
  • 1 tsp black pepper


When I made my chili, I again took the simple approach;

  • 1 can of V8
  • .5 can of Tomato juice
  • 1 medium yellow sweet onion (chop half of it fine, chop the other have a little bigger or whatever you like)
  • 1 can of chili beans (do not strain beans, pour everything in the can into the pot)
  • 2 lbs of hamburger (deer sausage works well here too)
    • (when using hamburger in your chili, go for the 92% lean, and just toss the hamburger in the pot with the tomato juice to cook it, the hamburger fat will cook out and float to the top, strain some off, or keep it in, your choice)
  • 4 stalks of celery (chop large or small your choice, this can also be substituted with celery seeds in the spice mix, about 1 tsp in the mix)
  • 1/4 of a large green bell pepper (chop into small cube shapes)
  • (whatever else you like in your chili) 

I cook mine in a crock pot on high for about 5 hours, removing the lid to let the steam escape to control thickness of chili.

Enjoy, and my kids love it too.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Kid Friendly Cajun Chicken Wings/Legs

clock December 25, 2008 16:29 by author csmith12

I cook allot... I mean almost every night. But when I come across a winner, I stick with it. Below is the recipe for a favorite year round diner my family has. Although a simple chicken dish, it takes about 45 minutes to cook, start to finish. It also can be accelerated with some precook time. In fact, it just may be better to marinade the chicken in the sauce overnight. I will try it and and add a comment with my findings.

Mild/Smooth Cajun Chicken

3lb of mixed skin on chicken wings (I toss in a few legs for the daughter)
8oz of real salted sweet cream butter
1/4 cup of franks red hot hot sauce
My secret Blackening Powder to taste (I don't measure, but would estimate about 2 tablespoons)

Prep:

Chicken
Boil chicken in water in pot until just under fully cooked, I break one open to see if there is any redness or pink in the middle. It's very important not to overcook the chicken here or the rest will not turn out right. It should be very juicy and plump. It's best to error on the undercooked side here as you can always finish up the cooking on the grill later.

Sauce:
This is the easy part. Drop butter in small sauce pan and slowly melt. When the butter is melted, stir in the Franks Hot Sauces. Until you get the hang of it, pour in smaller portions until you get a nice pumpkin orange color. Add a pinch of salt, pepper and a pinch of a chili powder for a nice presentation. Stir until fully blended, I find that getting the temperature just right will help in keeping the sauce ready for cooking. 

Never, never, never boil this mixture, it will change the taste.


Cooking:

Preheat grill to 400-500 degrees
Preheat oven to 375
Start by shaking My secret Blackening Powder onto the prepped chicken.
Put ceramic serving platter into oven to heat up
Then basting the chicken with a brush with the sauce mixture.
Quickly add chicken to grilling surface and baste a second time.
Cook chicken as you see fit while turning and basting occasionally, but be careful not to overcook the chicken or it will be dry.

Place fully cooked chicken on seasoned serving platter, carry to table and place on creative table placement piece. Serve with slightly under room temperature ranch or blue cheese dressing.

Hope you find this recipe as enjoyable as my family does. As you are making it, it may seem as if this is way to hot and spicy for kids, but I have found this to be the opposite.

Enjoy,

 

Chris

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Some Silly things I have seen Base Pages for in Asp.Net

clock December 19, 2008 06:38 by author csmith12

After working in the field for a while, I have ran across some silly stuff I have seen other developers do. Below is a list. I am hoping that between my knowledge, and the experience of others. Some better approaches can be derived. Feel free to comment below to add your own silly issue.

 

Silly Issue 1: Use a base page to set page title.
Now this issue can be solved in many ways. Overall I go for the simplest approach if it will satisfy the needs. for example;

protected override void Render(HtmlTextWriter writer)
{
    Page.Title = string.Format("My site title - {0}", Page.Title);
    base.Render(writer);
}
Put that code in your master page. Or even better yet would be to pull the site title from the web.config.

Silly Issue 2: Use a base page to initialize connections to a database.
Simple.... never, never, never, never do this. When the database goes offline, there is no reason that a static page should break. Instead just utilize some data access framework, TableAdapters, Linq.... anything.

 

Silly Issue 3: Use a base page to enforce a proper URL (www.xyz.com or xyz.com).
This is also simple, fight the temptation to do this via code, and ask the IT guys to do this via DNS or some other technology. There is no reason to muddy up the code of a web site for this reason, and will come back to bite you on DEV and STG environments anyway. So even more code/configuration to support a silly decision in the first place.

 

Silly Issue 4: Use a base page to handle error handling.
Do not do this. Handle code errors in a standard way, such as per page. And for the unhandled exceptions, utilize a IHttpModule that hooks the context.Error. Such as below maybe;

public class EmailErrorHandler : IHttpModule
  {
    #region IHttpModule Members

    public void Dispose() {}

    public void Init(HttpApplication context)
    {
      // wire global error handle
      context.Error += ApplicationError;
    }

Then add the type to the web.config in the HttpModules section. Create an ApplicationError method that performs the actions you need. As you can see by the title of my class, mine sends an email.

Hopefully this will save someone some time.



Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


I am FOUND on YouTube

clock October 26, 2008 07:59 by author csmith12

To all my friends, I have been spotted on YouTube in the following video;



I am the second one in the sparring section of the video. And good job Travis. Congrats.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Cleaning up Web Form Binding to Entity Objects

clock October 26, 2008 05:27 by author csmith12

How many lines of code have we all written to set properties from a web form to a business object. 1000's of lines of code and countless wasted hours developing and debugging typos in field names. After years it gets old.

I found a article (http://msdn.microsoft.com/en-us/library/aa478957.aspx) on Microsoft's site about doing just what my goal was. My goal was to turn the hundreds of lines of code in application setting UI properties into business object properties.

For example;

Normal code;

// create entity
Person p = new Person(1, "John", "Doe");

p.FirstName = FirstName.Text;
p.LastName = LastName.Text;

// more code...
Goal code;

// create entity
Person p = new Person(1, "John", "Doe");

// bind
Binder.BindToControl(p, Page);

Enter the Binder class that I have so far after about 2 hours of R&D and playing around with different setups.

using System;
using System.Reflection;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Pixelect.Example.Web
{
    public static class Binder
    {
        public static void BindToControl(object entity, Control control)
        {
            // ensure objects
            if (entity == null || control == null) return;

            // get properties
            PropertyInfo[] infos = entity.GetType().GetProperties();

            // loop through each property info object
            foreach (PropertyInfo info in infos)
            {
                // if can read property
                if (info.CanRead)
                {
                    // find matching control
                    Control matchingControl = control.FindControl(info.Name);

                    // check for match
                    if (matchingControl == null) continue;

                    // process type
                    if (matchingControl is TextBox)
                        ((TextBox) matchingControl).Text = Convert.ChangeType(info.GetValue(entity, null), typeof(string)).ToString();

                    if (matchingControl is Literal)
                        ((Literal)matchingControl).Text = Convert.ChangeType(info.GetValue(entity, null), typeof(string)).ToString();

                    if (matchingControl is Label)
                        ((Label)matchingControl).Text = Convert.ChangeType(info.GetValue(entity, null), typeof(string)).ToString();

                    if (matchingControl is ListControl)
                    {
                        ListItem li = ((ListControl)matchingControl).Items.FindByValue(info.GetValue(entity, null).ToString());
                        if (li != null)
                        {
                            foreach (ListItem item in ((ListControl)matchingControl).Items)
                                item.Selected = false;

                            li.Selected = true;
                        }
                    }
                }
            }
        }
        public static void BindToObject(Control control, object entity)
        {
            // ensure objects
            if (entity == null || control == null) return;

            // get properties
            PropertyInfo[] infos = entity.GetType().GetProperties();

            // loop through each property info object
            foreach (PropertyInfo info in infos)
            {
                // if can read property
                if (info.CanWrite)
                {
                    // find matching control
                    Control matchingControl = control.FindControl(info.Name);

                    // check for match
                    if (matchingControl == null) continue;

                    // process type
                    if (matchingControl is TextBox)
                        info.SetValue(entity, Convert.ChangeType(((TextBox)matchingControl).Text, info.PropertyType), null);

                    if (matchingControl is ListControl)
                    {
                        if (((ListControl)matchingControl).SelectedItem != null)
                            info.SetValue(entity, Convert.ChangeType(((ListControl)matchingControl).SelectedItem.Value,  info.PropertyType), null);
                    }
                }
            }
        }
    }
}

This class allows easy binding between web form UI elements and entity objects where the UI control ID is equal to the entity property name. This is just a first draft of the class and I will be updating the class to support the bulk of the toolbox items in visual studio. I will also integrate the code from the Microsoft article to support known properties on unknown UI object types.

Then hopefully.... we can cut down on all that error prone and boring code that we all must type to bind UI elements to back end objects.

Enjoy

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


.Net with SMO, Triggers, Tables and the Modified (Last Updated Date)

clock October 4, 2008 04:12 by author csmith12

Have you ever had a lot of tables in a database that needed to have the timestamp of the record updated on insert or update? I know I have. I wish I could find a really good tool for automating some of the database development tasks that I perform. Until then, I end up writing my own scripts or code.

This code utilizes the .Net SMO object model to automatically create triggers for tables that have an Modified datetime column.

Below you will see my code for adding triggers to a MS SQL server database. These triggers will update the "Modified" column in the table when a record is inserted or updated. Feel free to modify the code to fit your specific needs as it is common for the "Modified" column to be named differently per database/project.

Limits:

1. Table can only have one primary key column

Enjoy!

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.SqlClient;
using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.Smo;

namespace Pixelect.MsSql
{
    public class ModifiedDateTriggerGenerator
    {
        public void Process(string database)
        {
            // get connection string
            string conString = ConfigurationManager.ConnectionStrings["SqlServerConnectionString"].ConnectionString;

            // create sql connection
            SqlConnection sqlConnection = new SqlConnection(conString);

            // create server connection
            ServerConnection serverConnection = new ServerConnection(sqlConnection);

            // create server
            Server server = new Server(serverConnection);    

            // 
            if (server.Databases.Contains(database))
                AddModifiedTriggerToTables(server.Databases[database]);
            else
                throw new Exception("Database not found.");
        }

        private static void AddModifiedTriggerToTables(Database database)
        {
            foreach (Table table in database.Tables)
            {
                if(table.Columns.Contains("ModifiedDate"))
                {
                    // check if table already had trigger, drop it
                    if (table.Triggers.Contains(string.Format("trg{0}SetModifiedDate", table.Name)))
                        table.Triggers[string.Format("trg{0}SetModifiedDate", table.Name)].Drop();
                    
                    // set up trigger
                    Trigger trigger = new Trigger(table, string.Format("trg{0}SetModifiedDate", table.Name));
                    trigger.TextMode = false;
                    trigger.Insert = true;
                    trigger.Update = true;

                    // get trigger resource
                    string textBody = TriggerTemplate.ResourceManager.GetString("ModifiedDateTrigger");

                    // get template
                    if(string.IsNullOrEmpty(textBody))
                        throw new Exception("Unable to get Modified trigger template from resource.");

                    // swap values
                    textBody = textBody.Replace("[table]", string.Format("[{0}]", table.Name));
                    textBody = textBody.Replace("[schema]", string.Format("[{0}]", table.Schema));

                    // get primary key of table
                    List<Column> keys = GetPrimaryKeys(table);

                    // i.[primaryKey] = [schema].[table].[primaryKey]
                    string keyChain = string.Empty;
                    foreach (Column col in keys)
                        keyChain += string.Format("i.{0} = [{1}].[{2}].[{3}] AND ", col.Name, table.Schema, table.Name, col.Name);
                    
                    // replace body
                    keyChain = keyChain.Substring(0, keyChain.Length - 5);
                    textBody = textBody.Replace("[keys]", keyChain);
                    
                    // update body
                    trigger.TextBody = textBody;

                    // create trigger
                    trigger.Create();
                }
            }
        }

        private static List<Column> GetPrimaryKeys(Table table)
        {
            List<Column> keys = new List<Column>();

            foreach (Column c in table.Columns)
                if (c.InPrimaryKey) keys.Add(c);

            return keys;
        }
    }
}

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


More Taekwondo Results

clock September 25, 2008 02:28 by author csmith12

We went to another tournament this year in Lexington KY. Just wanted to post the results for my buddies.

1st place sparring
2nd place forms

My son competed in a tough group and didn't place, but he had a blast anyway. And that is what is all about. He has the best attitude for an 8 yr old.

I will update this post with some pictures or movies when I get time to come up for air.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Common User Mistake

clock September 25, 2008 02:20 by author csmith12

After developing web pages for so long, and as a web user for a long time.... Sometimes we start to overlook the simple things.

For example;
A user sent me a screen shot stating the colors were messed up on a set of textboxes on a web form. After a few minutes confirming the CSS, I looked at the screen shot again. All the text boxes had a yellow background.

The answer was also right there in front of me as well, but as complacent as I was, it didn't hit me until the 2nd look. The Google toolbar was also installed and the autofill button was lit up. Ah the answer to my question is there in the options.

The fix is to have the user turn off the yellow color highlighting as shown below.

google yellow highlight

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Cincinnati Bell Phone Settings

clock July 11, 2008 00:23 by author csmith12

Recently, my wife and kids :( got new cell phones. Along with that came a new cell provider. As the title of this post indicates, Cincinnati Bell. Although the services has been good and their support has been helpful so far. I found myself configuring various phones until my wife found the one she wanted.

I though I would post the settings here for anyone else going through the same issues.

GPRS
----
Connects to: The Internet
Access Point: wap.gocbw.com
Username: (blank)
Password: (blank)
Primary DNS: (blank)
Secondary DNS: (blank)
IP Address: (blank)
PROXY
-----
Description: CBW Proxy
Connects From: WAP Network
Connects To: The Internet
Proxy: 216.68.79.202:80
Type: HTTP
User name: (blank)
Password: (blank)
MMSC Settings
-------------
Name: CBW
MMSC Url: http://mms.gocbw.com:8088/mms
WAP Gateway: 216.68.79.202
Port: 80
Connect Via: The Internet
Max. Sending Size: 300k

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Enabling Membership, Roles and Personalization in ASP.Net

clock April 8, 2008 16:12 by author csmith12

How to configure the ASP.NET 2.0 Membership/Roles Provider to use SQL 2000 or SQL 2005?

The information in this article applies to:

  • ASP.NET 2.0
  • MS SQL 2000
  • MS SQL 2005
  • Membership/Roles Provider

    SUMMARY

    How to set up the new ASP.NET 2.0 Membership, Role Management, and Personalization services to use a regular hosted SQL Server 2005 or SQL 2000 instead of MicroSoft SQL Server Express.

    DETAILS

    The following steps create the full Application Services database schema on our SQL Server database.

    1. Open the command prompt on your local computer, and navigate to:
      C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
    2. Execute the command:
      aspnet_regsql.exe -S [DB Server Name] -U [DB login] -P [Password] -A all -d [Database name]

    Below is an example of how to configure Visual Web Developer to manage the membership database.

    1. Create a web application in Visual Web Developer or Visual Studio 2005.
    2. Open the web.config.
    3. The default membership provider uses a connection string called "LocalSqlServer".          

    Replace:

    <connectionStrings/>

    with

    <connectionStrings><remove name="LocalSqlServer" />
    	<add name="LocalSqlServer" connectionString="Data Source=<DB_Server>;Integrated Security=false;Initial 
    		Catalog=<DB_Name>;User ID=<DB_User>;Password=<DB_password>" providerName="System.Data.SqlClient" />
    </connectionStrings>
     Save and close the web.config. 
    1. Go to Website menu, and run the ASP.NET Configuration tool. This will open the Web Site Administration tool in a browser window.
    2. Next.. In the Web Site Administration browser, go to the Security tab.
    3. Click on "Select authentication type".
    4. Select "From the internet".  Then click the "Done" button.
    5. Create your admin roles and users.
    6. Then create access rules.
    7. Create a rule that applies to the "Anonymous users" with "Deny" permissions.
    8. Create another rule that applies to the admin role you created with "Allow" permissions.
    9. Your application is now ready to use the membership provider.
  • Copied for ease of access. Credit given to: http://support.re-invent.com/article.aspx?id=10353

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5


    QOTD

    Have you ever needed a Captain Crunch Decoder Keyring to figure out code before? I have.....

    - Reactor

    Calendar

    <<  March 2010  >>
    MoTuWeThFrSaSu
    22232425262728
    1234567
    891011121314
    15161718192021
    22232425262728
    2930311234

    View posts in large calendar

    Sign in