Wednesday, February 12, 2014
Why You Should Never Eat Vegetable Oil or Margarine
Corn Oil
Soybean Oil
“Vegetable” oil
Peanut Oil
Sunflower Oil
Safflower Oil
Cottonseed Oil
Grapeseed Oil
Margarine
Shortening
I Can’t Believe Its Not Butter (You better believe it!)
Smart Balance (Not a Smart idea!)
Any fake butter or vegetable oils products"
'via Blog this'
Agree or disagree? I think its a good guideline but personally follow the "eat everything in moderation" plan. Except trans fat, definitely avoid that completely and minimize sugar intake.
This article promotes these foods:
Coconut Oil
Meats
Butter
Organic Cream
Olive Oil
Palm Oil
Avocado
Fish
Eggs
Eat in Moderation:
Flaxseed Oil
Walnut Oil
Macadamia Nut Oil
Nuts
Monday, January 6, 2014
Salted Paleo: Crunchy Butternut Squash Chips
'via Blog this'
Fantastic recipe. A bit time consuming for the amount of food, but a great healthy snack.
Seasoned some with paprika and garlic powder others with cumin and turmeric.
Tuesday, December 17, 2013
Sweet Potato Casserole Two Ways for the Holidays
First, the basic recipe is this one from my Aunt Nell who lived on the Eastern Shore of Virginia near Wallops Island. This is super southern and super sweet, I consider it a dessert.
Aunt Nell's Sweet Potato Casserole
3 cups sweet potatoes (probably canned)
2 eggs
1/3 cup sugar
1 tablespoon vanilla
1/2 cup butter
1 cup brown sugar
1/3 cup flour
1/3 cup butter
1 cup finely chopped pecans
Mix first five ingredients. Put in a 4-5 qt. casserole dish.
Mix sugar flour and pecans with melted butter, pour over casserole.
Bake at 350F 45 minutes to an hour.
I would cover with foil then remove for last 10 minutes.
This is not the recipe I made but the idea is the same.
My version is inspired by baby food. My 2 year old likes to eat mashed combinations of vegetables including sweet potato, rutabaga, butternut squash, parsnips, etc. So I made my casserole filling and toddler food at the same time!
The baby's portion gets removed from the mixer before all the spices go in or the bourbon goes on the pecans.
All the measurements are to taste because when using fresh vegetables its going to come out a little different every time. This amounts should do about a 9x13 casserole dish with about an inch of filling, maybe a bit more.
Sean's Root Vegetable Casserole with Bourbon Pecan Topping
For the filling
1 medium butternut squash, peeled, cleaned, diced
1 large rutabaga, peeled and diced
6 medium sweet potatoes, peeled and diced
1 egg
1/4 cup brown sugar, the darker the better
1 tbs vanilla extract
2 sticks of butter, softened
Note: All these spices I did to taste, measurements are a best guess to show proportions
2 tbs kosher salt
1 tsp ground nutmeg
1 tsp cinnamon
1/2 tsp ground cloves
1/2 tsp ground all spice
Preheat oven to 200F.
Cook all the vegetables on a low boil until very soft, falling apart when a fork goes in. They can be stringy if you under cook. Rutabaga takes the longest, then potato, then squash so either add them at different times or dice them at different sized.
Drain and pour cooked vegetables into the casserole dish, sprinkle salt all over. Put casserole into the over for about 30 minutes to help dry everything out. The more you can spread out the vegetables the better.
I don't know how to explain what a 'dry' looks like but they shouldn't be roasting in there. When they are dry you can add more butter so it tastes better :)
Remove vegetables, crank over to 375F.
Put vegetables into your mixer with two sticks of butter, sugar, vanilla, and start mixing. Add the egg, beat until smooth. Add your spices and salt to taste, more sugar is desired.
Grease your casserole dish with butter and add your filling. After making the topping, add it to the dish, cover with foil, bake for 30 minutes. Remove foil, cook another 10 and your done.
Bourbon Pecan topping
1 pound pecans coarsely chopped. I just hit the unopened bag with a rolling pin a few times.
1 cup dark brown sugar
1 stick butter
tsp flout
little nutmeg
1/2 cup bourbon, Evan Williams is a good choice because its cheap but still decent quality
In a sauce pan on medium low, melt the butter, add the sugar and pecans, keep stirring until just bubbling. Add the bourbon, might want to kill the flame first so you don't flambe it, or flambe it might be better ;) Watc h your eyebrows. Let that reduce by half and stir in the flour and a bit of nutmeg.
Pour it over the casserole and bake it.
I did this once with cashews instead of pecans and it tasted fine but the pecans are a better texture.
Friday, November 1, 2013
MvvmLight: Sharing code between WPF and Windows Store app using Portable Class Library (PCL)
I am attempting the same thing with a Win Store app (Win8) and a WPF45 app.
Following along the tutorial, I get the WPF version working.
The Store version has this funky error:
Error 1 Could not load file or assembly 'Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The assembly version has a public key token that does not match that of the request. (Exception from HRESULT: 0x80132001) Visual Studio 2012\Projects\MvvmPCLExample\Mvvm.Store\App.xaml 13 13 Mvvm.Store
If I run the project, it throws an exception that it cannot locate ViewModelLocator.
The problem was the store pointing to the PCL Version of Microsoft.Practices.ServiceLocation.
Fix
- Store project, References, Remove Microsoft.Practices.ServiceLocation
- Add Reference, Browse
- Under the project directory find packages\CommonServiceLocator.1.0\lib\NET35\Microsoft.Practices.ServiceLocation.dll and add that. Rebuild and it runs.
Although Visual Studio still reports the 'Could not load file or assembly error...'. But it doesn't seem to cause a problem.
UPDATE: After rebooting my computer, the error is totally gone! Reminds me of the joke about fixing a car made my Microsoft ;)
Sample Project if anyone wants to take a look.
Windows 8.1
Visual Studio 2012
MvvmLight 4.2.30
Wednesday, October 9, 2013
.Net 4.5 WebSocket Server Running on Windows 7? - Stack Overflow
'via Blog this'
Did you know you can't use the .NET WebSocket's in Windows 7?
using System.Net.WebSockets;
...
ClientWebSocket _webSocket = new ClientWebSocket();
This throws a big whopping PlatformNotSupportedException.
What load of crap. Now I need a WebSocket client implementation for Windows 8 and a separate one for Windows 7. Unbelievable.
EDIT: WebSocket4Net solves this is much easier to use then the .NET implementation.
Wednesday, September 11, 2013
WebSockets in .NET 4.5: System.Net.WebSockets.ClientWebSocket vs Windows.Networking.Sockets.MessageWebSocket
Props to this guy's example project on how to implement a simple WebSocket using System.Net.WebSockets in .NET 4.5. Another good example is here.
I am working on a Windows Store App (WinRT, Metro, Win 8, or whatever name they are trying to market this under currently) and a .NET 4.5 application. Both will be using a WebSocket to talk to the same server.
The WinRT Windows.Networking.Sockets.MessageWebSocket is a wonderfully simple way to use a WebSocket to send and receive strings back and forth. Microsoft has a nice sample project here.
The .NET 4.5 System.Net.WebSockets.ClientWebSocket is just the opposite. See aforementioned blog for a 'simple' example.
Please see both sample projects for details: MessageWebSocket, ClientWebSocket
Two things make the MessageWebSocket really easy to use. First, it has a messageRecieved event handler, so all you need to handle incoming messages is attach a method thusly:
messageWebSocket.MessageReceived += MessageReceived;
See the sample project for the MessageRecieved implementation.
ClientWebSocket requires wrapping the Send and Receive actions in tasks and monitoring the receive buffer with a loop. Reminds me of old time socket monitoring. I though WebSockets were supposed to make my life simpler?
Secondly, MessageWebSocket provides a DataWriter so all you have todo to read or write strings is set the message type, grab the reader, and send a string.
//set the message typemessageWebSocket.Control.MessageType = SocketMessageType.Utf8;
//wrap the output in a DataWritermessageWriter = new DataWriter(messageWebSocket.OutputStream);//put a string on the writermessageWriter.WriteString(message);
// Send the data as one complete message.await messageWriter.StoreAsync();
Compare this to the ClientWebSocket in .net 4.5:
byte[] sendBytes = Encoding.UTF8.GetBytes(message);var sendBuffer = new ArraySegment<byte>(sendBytes);
await socket.SendAsync(
sendBuffer,
WebSocketMessageType.Text,
endOfMessage: true,cancellationToken: cts.Token);
byte[] seriously? I already have a string why would I want to revert to such a low level wrapper?
Reading messages is similarly easy in MessageWebSocket vs ClientWebSocket. See the example projects for details.
Conclusion:
Its good to have all the options provided in the System.Net.WebSockets namespace, but the end of the day, a WebSocket should make my life easy when all I need to do is send and receive some strings (json for example). I find it vexing this is provided for Windows Store Apps, but they don’t provide the same thing across platforms.
If I iron this out I’ll try to get a sample project uploaded showing how to get behavior similar to MessageWebSocket while using ClientWebSocket. No timeframe on this, sorry.
Thursday, September 5, 2013
MVVM Light, WPF, and Opening New Windows
Ran across this while trying to figure out how to properly open a new window in a WPF project using MVVM Light toolkit.
Viv posts a good example project using Messenger to communicate between ViewModel and View. But the code used to new up the appropriate ViewModel and View for the new window is all in the code behind for MainWindow (MainWindow.xaml.cs). I generally avoid putting anything in a code behind, so I added another button showing how to do the same thing without the code behind.
Sample Project - Dropbox download page
Which method is better? Pro’s and Con’s? Let me know, I just dislike code behind.
Here are the main points, see the sample project for the details.
I'm utilizing the ViewModelLocator singleton for this static method
1: public static void CreateWindow(OpenWindowMessage message)
2: { 3: var uniqueKey = System.Guid.NewGuid().ToString(); 4: var nonModalWindowVM = SimpleIoc.Default.GetInstance<NonModalWindowViewModel>(uniqueKey); 5: nonModalWindowVM.MyText = message.Argument;6: var nonModalWindow = new NonModalWindow()
7: { 8: DataContext = nonModalWindowVM 9: }; 10: nonModalWindow.Closed += (sender, args) => SimpleIoc.Default.Unregister(uniqueKey); 11: nonModalWindow.Show(); 12: }The MainWindowViewModel has a RelayCommand so the button on MainWindow.xaml has something to bind to.
public RelayCommand OpenNonModalDialog_NoCodeBehind { get; private set; }
Constructor wires up the RelayCommand
OpenNonModalDialog =
new RelayCommand(() =>
Messenger.Default.Send<OpenWindowMessage>(
new OpenWindowMessage() {Type = WindowType.kNonModal, Argument = SomeString})); //No Code BehindOpenNonModalDialog_NoCodeBehind =
new RelayCommand(() =>
ViewModelLocator.CreateWindow(new OpenWindowMessage() { Type = WindowType.kNonModal, Argument = SomeString }));Notice the first is using Messenger to tell the code behind to create the window.
The No Code Behind is using the static method on ViewModelLocator.
MainWindow.xaml, Button.Command is bound to the no code behind relay command
<Button Grid.Row="1"
Grid.Column="0"
Margin="10"
Command="{Binding OpenNonModalDialog_NoCodeBehind}"
Content="Open No Code Behind" />