This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var test = new Test {Name = "Rune", Number = 35}; | |
var serialized = XamlWriter.Save(test); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class OpenXmlExtensions | |
{ | |
public static Paragraph AppendTextParagraph(this OpenXmlCompositeElement element, string text) | |
{ | |
return AppendTextParagraph(element, text, false, kDefaultFontSize); | |
} | |
public static Paragraph AppendTextParagraph(this OpenXmlCompositeElement element, string text, bool bold) | |
{ | |
return AppendTextParagraph(element, text, bold, kDefaultFontSize); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using BallZ.Levels; | |
using FarseerPhysics; | |
using Microsoft.Xna.Framework; | |
using Microsoft.Xna.Framework.Graphics; | |
using Microsoft.Xna.Framework.Input.Touch; | |
namespace BallZ | |
{ | |
public class BallZGame : Game | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# language: no | |
Egenskap: Registreringer | |
Scenario: Skal kunne lagre data for ulykke | |
Gitt at jeg er logget inn med brukernavn "traumetest" og passord "traumetest" | |
Og at jeg har rollen "Registeransvarlig" for resh "100087" | |
Og jeg har valgt pasient med personnr "16082605812" | |
Og personen har ingen registrerte aktiviteter | |
Når jeg registrer et ulykkeskjema med dato "13.12.2013 14:00" | |
Så skal ulykkeskjemaet kunne leses ut med dato "13.12.2013 14:00" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class ViewModel : INotifyPropertyChanged | |
{ | |
public event PropertyChangedEventHandler PropertyChanged; | |
[NotifyPropertyChangedInvocator] | |
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Denne kan alltid installeres fra: | |
#http://boxstarter.org/package/nr/url?https://gist.github.com/runegri/ef2c6659da88c711cfc0/raw/ | |
Set-BoxstarterConfig -NugetSources "https://www.myget.org/F/hemittest/auth/ff09b58c-3759-4517-bdb9-6ae36d6f3a65/api/v2;http://chocolatey.org/api/v2;http://www.myget.org/F/boxstarter/api/v2" | |
#Enable Web Services | |
cinst IIS-WebServerRole -source WindowsFeatures | |
cinst IIS-ISAPIFilter -source WindowsFeatures | |
cinst IIS-ISAPIExtensions -source WindowsFeatures |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Analysis of the NYC taxi data set | |
http://bit.ly/1XVsny0 | |
An article about the danish railways and azure | |
http://bit.ly/24n7Kum | |
The Norwegian Data Protection Authority’s guide for cloud services (in Norwegian) | |
http://bit.ly/25oybFM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Encryptor | |
{ | |
public static void WriteXmlForCert(string thumbprint, string fileName) | |
{ | |
var store = new X509Store(StoreName.My, StoreLocation.CurrentUser); | |
store.Open(OpenFlags.ReadOnly); | |
var certs = store.Certificates.Find(X509FindType.FindByThumbprint, thumbprint, false); | |
store.Close(); | |
var cert = certs[0]; | |
var rsa = (RSA)cert.PublicKey.Key; |