/* Create close cut off date time variable.*/ DECLARE @CutOffDateTime DATETIME SET @CutOffDateTime = CONVERT(DATETIME, CONVERT(NVARCHAR(10),CONVERT(DATE,GETDATE())) + ' 10:10:00.000')
This book is a free resource from Microsoft Press which helps students learn to program with the .Net Gadgeteer, a device originated at the Microsoft Research in Cambridge, U.K..
The Gadgeteer book explains how to program with VB and .Net using the FEZ Cerberus Tinker Kit modules such as the mainboard, USPClientSP power module, the Joystick, the LED strip, and the Display N18 module.
Students plug together modules then use Visual Studio 2012 or Visual Studio 2010 to build a .Net Gadgeteer project.
The Visual Studio project includes lots of visual tools for connecting and configuring modules.
I love this book and the FEZ Tinker Kit.
Back in the day I remember buying electronic parts, wiring up boards and hooking up devices based on computer magazine articles.
This kit gives a similar ‘hands on experience’ with the power of VB and .NET added in.
This book and the FEZ Cerberus Tinker Kit are highly recommended for the young nerds in your life. The book is free and the kit costs around $100 U.S.
With Microsoft Roslyn you can write applications that evaluate code at runtime.
While it’s been possible to implement scripting since the release of .Net it’s not been easy. Check out Brian Rasmussen’s blog on scripting:
Learn about the Roslyn scripting API
Rachel Apel has written a concise easy to understand article about building a responsive and modern UI with CSS for WinJS apps.
The Windows Library for JavaScript is a library of CSS and JavaScript files. It contains JavaScript objects, organized into namespaces, designed to make developing Windows Store app using JavaScript easier. Windows Library for JavaScript includes objects that help you handle activation, access storage, and define your own classes and namespaces.
In Rachel's article includes plenty of good examples of markup, designer, and code which show how CSS for WinJs apps can be used to create a modern responsive design.
Read the article: Build a Responsive and Modern UI with CSS for WinJS Apps
The Reflector class below generates an HTML document outlining the public API for a given assembly.
First, an XML document is emitted in memory (see Emit*()).
The document captures the relevant aspects of the assembly's metadata.
Next, an HTML document is extracted from the XML document (see Extract*()).
I love Linq.
Public Class Reflector Public document As XDocument Public Sub Reflect(ByVal assemblyFile As String) Dim Assembly As Assembly = Assembly.LoadFrom(assemblyFile) document = New XDocument(EmitAssembly(Assembly)) End Sub Public Sub Transform(ByVal writer As XmlWriter) If document Is Nothing Then Return Dim assembly As XElement = document.Element("assembly") Dim transform As New XDocument(ExtractAssembly(assembly)) transform.Save(writer) End Sub Public Function EmitAssembly(ByVal assembly As Assembly) As XElement Return End Function Public Function EmitNamespace(ByVal ns As String, ByVal types As IEnumerable(Of Type)) As XElement Return End Function Public Function EmitType(ByVal type As Type) As XElement Return < name=> > End Function Public Function EmitGenericArguments(ByVal args As IEnumerable(Of Type)) As IEnumerable(Of XElement) Return From arg In args _ Select End Function Public Function EmitModifiers(ByVal type As Type) As XElement Dim builder As StringBuilder = New StringBuilder() If type.IsPublic Then builder.Append("public") ElseIf type.IsNestedPublic Then builder.Append("public") ElseIf type.IsNestedFamily Then builder.Append("protected") ElseIf type.IsNestedFamANDAssem Then builder.Append("protected internal") End If If type.IsSealed Then builder.Append(" sealed") If type.IsAbstract Then builder.Append(" abstract") Return End Function Public Function EmitExtends(ByVal baseType As Type) As XElement If baseType Is Nothing Or baseType Is GetType(Object) Or baseType Is GetType(ValueType) Or baseType Is GetType(System.Enum) Then Return Nothing Return End Function Public Function EmitImplements(ByVal ifaces As IEnumerable(Of Type)) As IEnumerable(Of XElement) Return From iface In ifaces _ Select End Function Public Function EmitDeclaringType(ByVal declaringType As Type) As XElement If declaringType Is Nothing Then Return Nothing Return End Function Public Function EmitNestedTypes(ByVal ntypes As IEnumerable(Of Type)) As IEnumerable(Of XElement) Return From ntype In ntypes _ Where GetVisible(ntype) _ Select EmitType(ntype) End Function Public Function EmitMethods(ByVal metds As IEnumerable(Of MethodBase)) As IEnumerable(Of XElement) Return From metd In metds _ Where GetVisible(metd) _ Select End Function Public Function EmitProperties(ByVal props As IEnumerable(Of PropertyInfo)) As IEnumerable(Of XElement) Return From prop In props _ Where GetVisible(prop.GetGetMethod()) Or _ GetVisible(prop.GetSetMethod()) _ Select End Function Public Function EmitReference(ByVal type As Type) As IEnumerable(Of Object) If (Not type.IsGenericType) Then Return New Object() {New XAttribute("name", type.Name), _ New XAttribute("namespace", GetNamespace(type))} Else Return New Object() {New XAttribute("name", type.Name), _ New XAttribute("namespace", GetNamespace(type)), _ EmitGenericArguments(type.GetGenericArguments())} End If End Function Public Function EmitModifiers(ByVal metd As MethodBase) As XElement Dim builder As StringBuilder = New StringBuilder() If metd.IsPublic Then builder.Append("public") ElseIf metd.IsFamily Then builder.Append("protected") ElseIf metd.IsFamilyAndAssembly Then builder.Append("protected internal") End If If metd.IsAbstract Then builder.Append(" abstract") If metd.IsStatic Then builder.Append(" static") If metd.IsVirtual Then builder.Append(" virtual") Return New XElement("modifiers", builder.ToString()) End Function Public Function EmitReturnType(ByVal metd As MethodBase) As XElement Dim metdInfo As MethodInfo = TryCast(metd, MethodInfo) If metdInfo Is Nothing Then Return Nothing Return End Function Public Function EmitExtension(ByVal metd As MethodBase) As XElement Return End Function Public Function EmitParameters(ByVal parms As IEnumerable(Of ParameterInfo)) As IEnumerable(Of XElement) Return From parm In parms _ Select End Function Public Shared Function GetNamespace(ByVal type As Type) As String Dim ns As String = type.Namespace Return If(ns IsNot Nothing, ns, String.Empty) End Function Public Shared Function GetVisible(ByVal type As Type) As Boolean Return type.IsPublic Or type.IsNestedPublic Or type.IsNestedFamily Or type.IsNestedFamANDAssem End Function Public Shared Function GetVisible(ByVal metd As MethodBase) As Boolean Return metd IsNot Nothing AndAlso (metd.IsPublic Or metd.IsFamily Or metd.IsFamilyAndAssembly) End Function Public Function ExtractAssembly(ByVal assembly As XElement) As XElement Return Assembly: End Function Public Function ExtractNamespace(ByVal ns As XElement) As XElement Return Namespace: End Function Public Function ExtractType(ByVal type As XElement) As XElement Return End Function Public Function ExtractModifiers(ByVal element As XElement) As String Return element.Element("modifiers").Value End Function Public Function ExtractName(ByVal element As XElement) As String Dim name As String = element.Attribute("name").Value Dim i As Integer = name.LastIndexOf("`") If i > 0 Then name = name.Substring(0, i) ' fix generic name Return name End Function Public Function ExtractGenericArguments(ByVal element As XElement) As String If Not element.Elements("genericArgument").Any() Then Return String.Empty Dim builder As StringBuilder = New StringBuilder("<") For Each genericArgument As XElement In element.Elements("genericArgument") If builder.Length <> 1 Then builder.Append(", ") builder.Append(ExtractReference(genericArgument)) Next builder.Append(">") Return builder.ToString() End Function Public Function ExtractReference(ByVal element As XElement) As String Return ExtractName(element) + ExtractGenericArguments(element) End Function Public Function ExtractInherits(ByVal type As XElement) As String If Not type.Elements("extends").Concat(type.Elements("implements")).Any() Then Return String.Empty Dim builder As New StringBuilder() For Each [inherits] As XElement In type.Elements("extends").Concat(type.Elements("implements")) If builder.Length = 0 Then builder.Append(" : ") Else builder.Append(", ") End If builder.Append(ExtractReference([inherits])) Next Return builder.ToString() End Function Public Function ExtractConstructors(ByVal type As XElement) As XElement Dim ctors = From ctor In type.Elements("method") _ Where ExtractName(ctor) = ".ctor" _ Select
Until now the VB and C# compilers have been black boxes, un accessible to Microsoft.Net developers.
Enter Microsoft Roslyn, “a set of APIs for exposing the Microsoft C# and Visual Basic .NET compilers as services available at runtime.”
This software is currently available as a community technology preview (CTP).
Roslyn can be imagined as a “compiler as a Windows service” which VB and C# developers can access through the new Roslyn APIs.
It allows the entire compile-execute process to be invoked from within .Net applications to, for example, give VB and C# a dynamic languages ability to generate and invoke code at runtime.
Or, how about incorporating Roslyn into a .NET application that accepts user input then uses Roslyn APIs to process the input (remember how good old class VB could evaluate a string?)
Roslyn is powerful but you won’t know how powerful it is until you try it out yourself.
Download it today!
The ASP.NET Identity system, new in Visual Studio 2013, is designed to replace the previous ASP.NET Membership and Simple Membership systems. It includes profile support, OAuth integration, works with OWIN, and is included with the ASP.NET templates shipped with Visual Studio 2013.
My experience with it is that it is simpler to use yet provides more options and easier extensibility.
ASP.NET Identity can be used with all of the ASP.NET frameworks, such as ASP.NET MVC, Web Forms, Web Pages, Web API, and SignalR.
Check out it’s claims based authentication. It gives you the ability to use more than just roles to grant access/permission to a user.
More….