This file contains 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
/* based on the docs at: https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide */ | |
/* | |
* LICENSE: MIT | |
* AUTOHR: [email protected] | |
*/ | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; |
This file contains 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
cscript zip.vbs zip_file.zip file1.ext file2.ext file3.ext |
This file contains 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
//SEE: http://stackoverflow.com/questions/2916348/using-moq-to-set-indexers-in-c-sharp | |
[TestMethod] | |
public void IndexTest() | |
{ | |
var mockHttpContext = new Mock<HttpContextBase>(); | |
var mockSession = new Mock<HttpSessionStateBase>(); | |
mockHttpContext.Setup(context => context.Session).Returns(mockSession.Object); | |
AppHttpContext.Current = () => mockHttpContext.Object; | |
var controller = new HomeController(); |
This file contains 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 Person Deserialize(string file) | |
{ | |
XmlSerializer serializer = new XmlSerializer(typeof(Person)); | |
Stream reader = new FileStream("myXmFile.xml", FileMode.Open); | |
Person temp=(Person)serializer.Deserialize(reader); | |
reader.Close(); | |
return temp; | |
} |