Sunday, July 1, 2012
Learning Entity Framework
Learn Entity Framework (MSDN site) Entity Framework
101 LINQ Examples – Great Resource to get you started writing queries (C#) 101 LINQ Samples
POCO
Working with POCO Entities
POCO Proxies
POCO Proxies Part 1 - ADO.NET Blog - Site Home - MSDN Blogs
POCO Proxies Part 2- Serializing POCO Proxies - ADO.NET Blog - Site Home - MSDN Blogs
POCO Example:
http://www.pluralsight-training.net/microsoft/players/PsodPlayer?author=julie-lerman&name=ef4-and-pocos&mode=live&clip=0&course=ef4-fundamentals
Wednesday, June 20, 2012
Sql Server Setup – Restart computer Failed
How many times have you tried installing Sql Server only to get a fail message stating that your machine needs to reboot.
This is usually due to some file operation required and can be resolved easily by removing a key from the registry without the need for rebooting. (Note: Do this at your own risk)
1) Run “regedit” from from the run menu (Windows Key + R)
2) Navigate to the following path in regedit
3) Find the key named “PendingFileRenameOperations” and Delete
4) Hit Re-run and you should be onto the next step of installation.
Sunday, June 17, 2012
Simple Regular Expressions in Javascript
Need to remove everything except alphabetic/letters in javascript?
Here is a simple example of using javascript to replace/remove characters
Step 1: Create a sample string
Step 2: Use a regular expression to remove characters that don’t match the characters you want
For more hints and examples in using Regular Expressions
Visit JavaScript RegExp Example- Online Regular Expression Tester
Pretty powerful and awesome one you learn how.
Wednesday, December 7, 2011
Setup 2-step verification with google gmail for additional security
Cool post on getting started with google 2 step verification:
http://googleblog.blogspot.com.au/2011/02/advanced-sign-in-security-for-your.html
Sunday, June 19, 2011
How to fix Database cannot be opened because it is version 661
I recently reinstalled Windows and went to load a project within Visual Studio and got the (YSOD as seen below) error that the database could not be opened because it is version 661 And that the server supports version 655 and earlier.
Basically the issue is that the version of SqlServer Express I had on my new machine was less than that on my old in which I was developing an application in.
So what to do?
Simple !! Update the current version of SQL Server Express on my machine to a newer version.
Checklist to remedy:
1) Check the current version of SQL Server installed on your machine.
2) Download and install the latest version of SQL Server Express from http://www.microsoft.com/sqlserver
3) Install and voila! All is working.
Sunday, May 2, 2010
Integrating WinMerge With Visual Studio 2012 / TortoiseSVN / VisualSVN
WinMerge is a great open source utility that can be used for source control code merge and code comparison within Visual Studio 2012.
You can download WinMerge from http://winmerge.org/
Download the installer and install.
Now in order to use WinMerge as your default tool for code difference and code merge you simply need to adjust Tortoise SVN settings.
Firstly in Visual Studio 2010 go to “Tools –> Options”
Navigate to VisualSVN and select “Tortoise SVN Settings” as shown above.
Under “External Programs”, select “Diff Viewer” and set the Diff Viewer settings as above to External and select the path to your WinMergeU.exe file in your installation directory.
Repeat the process for the Merge Tool as shown below.
WinMerge is now your default comparsion and merge tool within Visual Studio for Source Control operations.
Wednesday, April 15, 2009
Using Windows Live Writer to Blog to the world one post at a time
1) Try it out and stop complaining..
2) Keep looking around.
3) For the moment I am using Windows Live Writer and it seems to work well.
These are the features i’m looking to use.
a) SEO. Ability to add metatages and content tags so that
b) CHeck out the rest of the windows live writer plugins.
Ability to add some code..
namespace pluralsightCSharp
{
class Program
{
static void Main(string[] args)
{
var gameToRate = new NrlGameRater();
gameToRate.GamePerformanceRating();
Console.WriteLine("{0} kicks were made during the game.", gameToRate.);
Console.WriteLine(gameToRate.SetCompletionRate());
}
}
}
namespace pluralsightCSharp
{
public interface IGameRater
{
// General Statistics we want to obtain before performing
// all available on http://live.nrlstats.com/matches/nrl/match12960.html
// Home Team
string HT_Name { get; set; } // This can possibly change to Name
int HT_PointsScored { get; set; } // Score
int HT_Tries { get; set; } // Tries
int HT_Conversions { get; set; } // Conversions
int HT_PenaltyGoals { get; set; } // Penalty Goals
int HT_FieldGoals { get; set; } // Field Goals
int HT_SinBins { get; set; } // Sin Bins
int HT_SendOffs { get; set; } // Send Offs
int HT_Penalties { get; set; } // Penalties
int HT_Scrums { get; set; } // Scrums
int HT_SetCompletions { get; set; } // Completions
int HT_Sets { get; set; } // Sets
int HT_AllRuns { get; set; } // All Runs (m)
int HT_AllRunsMetresGained { get; set; } // All Runs Metres Gained (m)
int HT_LineBreaks { get; set; } // Line Breaks
int HT_Tackles { get; set; } // Tackles
int HT_MissedTackles { get; set; } // Missed Tackles
int HT_Offloads { get; set; } // Offloads
int HT_Errors { get; set; } // Errors
}
}
Some CSS
html { background-color: #e2e2e2; margin: 0; padding: 0; }
body { background-color: #fff; border-top: solid 10px #000; color: #333; font-size: .85em; font-family: "Segoe UI", Verdana, Helvetica, Sans-Serif; margin: 0; padding: 0; }
a { color: #333; outline: none; padding-left: 3px; padding-right: 3px; text-decoration: underline; }
a:link, a:visited,
a:active, a:hover { color: #333; }
a:hover { background-color: #c7d1d6; }
header, footer, hgroup,
nav, section { display: block; }
mark { background-color: #a6dbed; padding-left: 5px; padding-right: 5px; }
.float-left { float: left; }
.float-right { float: right; }
.clear-fix:after { content: "."; clear: both; display: block; height: 0; visibility: hidden; }
h1, h2, h3,h4, h5, h6 { color: #000; margin-bottom: 0; padding-bottom: 0; }
h1 { font-size: 2em; }
h2 { font-size: 1.75em; }
h3 { font-size: 1.2em; }
h4 { font-size: 1.1em; }
h5, h6 { font-size: 1em; }
/* main layout
----------------------------------------------------------*/
.content-wrapper { margin: 0 auto; max-width: 960px; }
#body { background-color: #efeeef; clear: both; padding-bottom: 35px; }
.main-content { background: url("../Images/accent.png") no-repeat; padding-left: 10px; padding-top: 30px; }
.featured + .main-content { background: url("../Images/heroAccent.png") no-repeat; }
footer { clear: both; background-color: #e2e2e2; font-size: .8em; height: 100px; }
Friday, June 20, 2008
CSS Rounded Corners Tool
Found this pretty cool CSS Rounded Corner Tool.
Great CSS Rounded Corners Tool
http://www.neuroticweb.com/recursos/css-rounded-box/index.php?color=FF6666&fondo=00FF66
http://www.neuroticweb.com/recursos/css-rounded-box/index.php?color=FFFFFF&fondo=4D6489
Friday, May 2, 2008
Sql Server Management Studio Keyboard Shortcuts
Here is the MSDN page for all keyboard shortcuts for all versions of SQL Server Management Studio
Friday, February 29, 2008
ASP.NET Server.Transfer Vs Response.Direct
In essence:
Response.Redirect simply sends a message back to the browser, telling it to move to another page.
whereas
Server.Transfer conserves server resources. Instead of telling the browser to redirect, it simply changes the "focus" on the Web server and transfers the request. This means you don't get as many HTTP requests coming through, which should ease the pressure on your Web server and make your application run faster.
Keep in mind though, because the "transfer" process can work on only those sites running on the server, you can't use Server.Transfer to send the user to an external site. Only Response.Redirect can do that!!