Here are the methods to calculate mean, variance, and standard deviation of a vector of values. These are put here for easy reference, so that I do not need to rewrite them again (and again (and again)).
TL;DR
A single INSERT/UPDATE/DELETE statement is run within an implicit transaction scope regardless of how many records they modify A transaction must be explicitly rolled back upon error After a transaction is rolled back, the error should be raised so that the script runner becomes aware of the error A single INSERT/UPDATE/DELETE statement Each individual INSERT/UPDATE/DELETE statement is run by SQL Server within an implicit transaction scope. This is regardless of the number of records affected by these statements.
Git TFS is a program that extends git commands to talk to a TFS remote repository (instead of a git repository). It creates a real git repository and replays the TFS history on top of it. It can be treated as a real git repository except for when it comes to cloning and syncing. In spite of that it still makes a programmer’s life much easier.
The best starting point is the project’s ReadMe file on GitHub.
The source code for this post is on GitHub.
When it comes to mocking a DbSet to test various read and write operations things may get a little bit tricky. Mocking a DbSet for a write operation (Add, Update, or Remove) is quite straightforward. But testing a synchronous read operation requires mocking the whole IQueryable interface. Even more trickier than that is testing an asynchronous read operation which requires mocking an IDbAsyncQueryProvider interface.
The switch data type is used to control whether a switch (as in arguments or options passed to a function or command) is provided for the function/command or not. Suppose that there is a function called Switch-Demo that can accept -Force and -Quiet switches. These switches just work as toggles. What we care about them is whether they exist or not. There are no pieces of data accompanying them. The PowerShell switch data-type suits this purpose:
I recently created a library that contains some handy extensions for INotifyPropertyChanged interface (aka INPC). To start using the library, add the following to the top of your C# code:
using NotifyPropertyChangedExtensions; How to easily raise INPC in a refactor friendly way public class MyClass : INotifyPropertyChanged { private int _number; public int Number { get { return _number; } set { if(_number != value) { _number = value; this.
Years ago I created a tool called Code4Public to convert source code into HTML called. I was using this tool to put nice code snippets in the blog I used to maintain at that time. The tool is able to get the code, apply syntax highlighting to it based on the syntax of the language selected, and then create HTML based on the theme selected (e.g., MSDN theme). I didn’t assign more time on making the tool better and better, as better ways of doing the same task were emerging, and also other by-products of the tool were becoming more interesting at the time; e.
I could gracefully install and test earlier versions of Android Studio before they adopted Gradle for their build system. After doing the upgrade I could no longer build a single project with weird error messages relating to Gradle. I searched the web, and found some workarounds in stackoverflow, e.g., manually installing Gradle, updating environment variables and so and so. None of them were helpful for me, although they seemed to be solving the issue for many (who have voted for the answers).
I’ve moved my blog from Wordpress to my homepage domain. It makes use of Octopress, which is based on Jekyll, and is a static site generator. The blog is hosted on GitHub pages, and is open source.
The great benefit of this stack of tools is that I can easily create and edit my posts in Markdown, re-generate the blog through command line, and make use of Rake (Ruby’s make tools) to perform various tasks ranging from post creation to deployment to GitHub pages.
Imagine that we want to create a Person business object for whose properties we desire a two-way data binding. The source-to-target data-binding can be triggered by implementing INotifyPropertyChanged interface, like this:
public class Person : INotifyPropertyChanged { private string _name; private double _age; public string Name { get { return _name; } set { if (value != _name) { _name = value; OnPropertyChanged("Name"); } } } public double Age { get { return _age; } set { if (_age !
In C# Code var newGuid = Guid.NewGuid(); In Visual Studio Go to: Tools > Create GUID
In SQL Server Management Studio Execute either of the following queries:
SELECT NEWID() or
PRINT NEWID() None of the above Go to newguid.com, and refresh the page as many times as you want.