This blog is for all Microsoft & .net lovers who may find themselves in need of help or information once in a while. We all have questions and we all need to know more than we know right now. When I come across things that I think may be useful, I post it. When I have something to say that I think is important, which is everything, I post it. All of my C#, ASP.NET, VB, AJAX & programming friends around the world are welcome to the info in my blog - Ramblings Of A Crazy DotNet Woman!
Thursday, December 29, 2011
Why Microsoft Got The Windows 7 Phone Wrong - Part 1
Tuesday, December 13, 2011
How To Remove Duplicates And Sort Lists Of Things In C#
string[] sItems = { "one", "two", "three", "four", "five", "one", "two", "one", "two", "one", "two", "one" };
//counts the number of times a value occurs
var counts = from sItem in sItems
group sItem by sItem into g
select new { Item = g.Key, Count = g.Count() };
//removes duplicates and preserves the original order
var dedupe1 = new HashSet<string>(sItems);
//removes duplicates and preserves the original order
var dedupe2 = sItems.Distinct();
//removes duplicates and reverse the order of elements
var dedupeAndReverse1 = sItems.Distinct().Reverse();
//remove duplicates and sort
var dedupeAndSort = sItems.Distinct().OrderBy(x => x);
There are additional ways to accomplish the same thing, but these are simple, quick and easy to use.
Sunday, July 10, 2011
OMG! How To Burn AVI Files In iDVD On A Mac For Free!
Anyway, I recently decided to burn some videos using iDVD. However, the videos were .AVI files. That shouldn't be a problem right? WRONG! iDVD doesn't allow you to burn .avi files to DVD right out of the box - at least not the version I have. So what is a girl with .avi files to do when she wants to burn them to DVD using iDVD? DOWNLOAD THE CODEC THAT WILL ALLOW ME TO DO IT! :-)
I found a lot of misinformation out there about how to burn .avi files on a Mac. Some people suggested that I would need to download Toast, which is not free. They also suggested other programs which were not free. Since I have PCs, I'm used to not paying extra for ordinary things like burning .avi files and I'm not going to change that trend. Anyway, follow these instructions to burn your. .avi files using iDVD.
Before you begin, close iDVD if it is open.
1. Download the Divx codec using this link. http://www.divx.com/en/software/download This link will send you to the Divx download page that offers everything you need. Just download it. It is going to contain some things that you likely aren't going to use, but it is all in one package.
2. Once the package has been downloaded, double-click it and walk through the install process.
3. Download Perian's software. This will allow you to hear your videos - which is a nice thing. Go to http://www.perian.org/.
4. Once the software downloads, double-click it and walk through the Perian installation process.
5. After the install process has completed, restart your machine.
6. After you restart your machine, go to iDVD and start a new project.
7. Now select File/Import/Video and select your .avi file.
8. Create the rest of your menu.
9. Check your movie to see if it works the way you think it should. This isn't a tutorial on how to use iDVD, so if you don't know what to do, follow the tutorial inside of the iDVD help area to learn how to make your movie menu, etc.
10. Burn your dvd.
There you have it! Now, here are a few things to remember. You CAN import .avi files into iDVD without doing a thing, however, if you don't have the correct codec installed, you won't see anything more than a green chromakey screen when you try to view your videos. DON'T make the mistake of importing the video and then just burning a DVD. If you can't watch the video in iDVD, then it WILL NOT show up correctly on the DVD you create. You will see the menu and be able to select the movie, however, it will just show up as a green screen on your DVD player. If you do not install Perian, you will not be able to hear your videos. You will be able to see them with Divx, but the audio codec that will allow you to hear the audio encoded into most .avi files will not be present - so make sure you install Perian.
If you are having trouble burning the DVD directly, you might need to create an image first using iDVD and then burn the image to dvd using Disk Utility. If you need to burn an image, select that option on the File menu in iDVD.
IMPORTANT NOTES:
MAKE SURE THAT YOU WATCH THE MOVIE BEFORE YOU BURN IT TO DVD! IF THERE ARE ANY ISSUES, SEEING BEFORE YOU WASTE A DVD IS ALWAYS PREFERABLE.
MAKE SURE THAT YOU DELETE ANY ENCODED ASSETS IF YOU ARE NOT CREATING A NEW PROJECT. (IN IDVD CLICK ON ADVANCED/DELETE ENCODED ASSETS)
MAKE SURE THAT THE SYSTEM OUTPUT VOLUME IS NOT DOWN LOW OR ON MUTE. CLICK ON THE APPLE SYMBOL IN THE UPPER RIGHT HAND CORNER OF THE SCREEN AND SELECT SYSTEM PREFERENCES. UNDER HARDWARE, SELECT SOUND. AT THE BOTTOM OF THE SCREEN, YOU WILL SEE OUTPUT VOLUME. MAKE SURE THAT IS ALL THE WAY UP AND NOT ON MUTE.
Have fun burning your .avi files using iDVD on a Mac for free!
Smooches,
Kila
Tuesday, April 19, 2011
I HATE Microsoft Excel And That Darn Ribbon!
Or.......maybe I'll quit my ranting and raving and just go develop a classic menu for Excel myself. Darn, if only I had the time! Microsoft, I'm really upset with you for this. Using MS Office used to be quick and efficient. Now, using it means hunting for the things I want to do and resting my mouse pointer over things to figure out if something is what I want. I spent 3 minutes trying to find the word count feature before I finally just went online to a word count website and used that tool instead! How is that better than what we had with the classic menu? You can't tell me that I'm alone here.
I KNOW I'm not alone. Productivity With MS Office - WAY DOWN! Frustration Level - WAY WAY UP!!!
http://www.exceluser.com/explore/surveys/ribbon/ribbon-survey-results.htm
Tuesday, March 8, 2011
How To Drop All Stored Procedures In Your Database When Using Sql Server
That is it! Now you can delete all of the stored procedures in your database quickly and easily!
USE YourDatabaseNameHere
GO
declare @storedProcedureName sysname
declare procCursor cursor for
select name from sysobjects where type = 'P' and objectproperty(id, 'IsMSShipped') = 0
open procCursor
fetch next from procCursor into @storedProcedureName
while @@FETCH_STATUS = 0
begin
exec('drop proc ' + @storedProcedureName)
fetch next from procCursor into @storedProcedureName
end
close procCursor
deallocate procCursor
go
Smooches,
Kila
Monday, February 28, 2011
How To Use Html.Action With Areas
That is real helpful isn't it? You can tell a lot from that error right? NOT!!!! That error might lead you to believe that some controller is having an issue. That is not the case! Instead, that error means that you have not set up your Html.Action item correctly. To get your areas to cooperate with Html.Action, you have to set your link up like this.:
Html.Action("YourMethod", "YourController", new { area = "YourArea" })
You might be wondering what you should do if you are using Html.Action and you are using a controller that is NOT in an area. Well let me tell you so you can stop wondering. You set up the action method like this:
Html.Action("YourMethod", "YourController", new { area = "" })
And that is it!!
Smooches,
Kila Morton
Problem:
"The controller for path was not found or does not implement IController"
Solution:
Use
Html.Action("YourMethod", "YourController", new { area = "YourArea" })
if you are referencing something inside of an area.
Use
Html.Action("YourMethod", "YourController", new { area = "" })
if you are not referencing something outside of the areas
Tuesday, January 18, 2011
How To Reset The Canon MP 190 So You Can Scan If You Have No Ink! Eliminate The Canon MP 190 Scan Blues!
Ready? Hold down the Stop/Reset button for about 30 seconds! There you go! I wish I could make it more intense. There just isn't anything else to it. Holding down that button will allow you to go back and scan documents even if you are completely out of ink. (SEE BELOW)
Don't you just love it?
Smooches,
Kila