SQL I Forget

I tend to forget how to insert into another table from selecting the data form another table so here is an upgrade snippet for next time.


 
INSERT INTO [FieldExplorer].[dbo].[Field_Guide_Annotations]
 ([Record_ID],[Value],[Type],[Table_ID])
Select [Id], [Definition], 0,6 
From [FieldExplorer].[dbo].[Field_Details]
Where [Definition] is not NULL 
Comments [0]

Visual Studio 2010 Box insert/editing

This is defiantly going to be one of my favorite new ide features.

<a href="http://thisoldcode.net/ct.ashx?id=779f4f42-c680-4426-912d-cabc83b8e833&amp;url=http%3a%2f%2fvideo.msn.com%2f%3fmkt%3den-US%26playlist%3dvideoByUuids%3auuids%3a3e57917d-1b92-4188-b898-25a1d64a408e%26showPlaylist%3dtrue%26from%3dshared"" target="_new" title="Box Selection and Multi-Line Editing Demo">Video: Box Selection and Multi-Line Editing Demo</a>

Via Coding 4 Fun, Filip’s Corner

Comments [0]

Missing Exception details for System.IO.FileInfo.Replace

Under the remarks section for System.IO.File.Replace in the MSDN documentation there is mention that an exception will be thrown  if the volume(drive) is different between the source and destination paths.

If the sourceFileName and destinationFileName are on different volumes, this method will raise an exception.

There is no mention in the exception section what type of System.IO.IOException you will receive in this case.

I found that when the volume for the destination and the source files differ you will receive:

System.IO.IOException: Unable to move the replacement file to the file to be replaced. The file to be replaced has retained its original name.

System.IO.FileInfo.Replace will also throw the above exception when the destination volume differs from the source file’s volume.  However the Documentation for System.IO.FileInfo.Replace makes no mention of this error condition.

Comments [0]

A Truly Local Web Site

I thought I would take a minute and tell you about my new favorite website www.somesite.com it took seconds for me to fall in love with it and I think if you are a web developer working on your local box you will too.  Somesite.com and *Somesite.com resolves to 127.0.0.1 in other words it can serve as a replacement for localhost. 

I can’t find any  whois info the somesite.com domain so depend on it at your own risk.

Comments [0]

My WPF Control list

Comments [0]

My Silverlight Control list

Community


Third Party Silverlight controls

Comments [0]

BizSpark

I found this video on visitmix.com  outlining the Microsoft BizSpark program which if you are a startup or contemplating becoming one you qualify for.  You receive Microsoft products and support for 25 developers.  Your supposed to be a private company but evidently if you still qualify if you will form a company with in 12 months of signing up.  Check out the full video

Comments [0]

IE 8 second opinions

I installed IE 8 today.  you can down load it from http://www.microsoft.com/windows/internet-explorer/worldwide-sites.aspx  over all I don’t see much difference.  I am disappointed they did not pick up Chrome’s tear out tabs.  Disappointed that they didn’t add Opera’s fast forward.  It’s nifty to have the developer tool bar in IE by default, though honestly who uses that? why distribute it to all internet users?  web slices, is a proprietary waste. I just want an unobtrusive browser.  I appreciate that while 8 breaks several websites it is more standards compliant, this site renders better under 8 then 7 or 6. 

Microsoft says ie 8 is just the beginning, which is good because they still have a lot of catching up to do.

Comments [0]

Leave the codebase cleaner than you found.

I had a short hall way conversation with a co-worker regarding programming in the real world.  Or in other words meeting your dead line at any cost.  His contention was that in order to meet his dead line, it’s better to give up on layered architecture and mix the  UI, business,  and data access.  That this is fast and produced the desired end results.

I agree that his team is producing the desired end results, So it’s very difficult to argue over code structure.  But This is a green field project, and already no structure.  There is little doubt in my mind that at some point, a feature will be dropped because the code/framework was just to much of an obstruction . 

I think it is important to remember that the quality of our deliverables is in the code as well as the GUI.   Maintenance counts.

Comments [0]

Authorization – Privilege – Permission

I wanted to create a list of useful design information for user access rights.   This isn’t such a common term in the industry just in our office.  What we really want to talk about is user authorization.  Authorization can be broken into two main listings Access Control Lists(ACL) and Role Based Access Control(RBAC)

 

ACL

Access control list(wikipedia )

Access Control Lists & Access Control Objects, good tutorial?(stackoverflow)

Access Control List

 

RBAC

How to build role-based access control in SQL

How To: Use Authorization Manager (AzMan) with ASP.NET 2.0

What Is Authorization Manager

Implementing Role Based Security using CSharp

Role-Based Security

Comments [0]