In my previous post, I talked about the Hybrid Partial View protocol, and showed a visualization about how it actually works. Something that is important to note about this protocol, it is mostly meant to create a gossip topology that is resilient to failure. It is not meant to actually send messages, it is meant to serve as the backbone topology (the peer sampling service) for figuring out what are the nodes. The reason for that can be seen in the following 10 node cluster (after running heartbeat enough times to get to a stable state:
us assume that we want to disseminate a message across the cluster. We select node A as our root, and then send a message. The rules are as follow: Each node send the message to all its active connections (except the sender, of course). A node that got the same message twice will ignore the message. Based on those rules, and the topology above, we’re going to have the following chain of messages: F – initial broadcast F -> E, G, J E -> G, I G -> E, H J -> I, H, J H ->...(Read whole news on source site)
Links only again today as Christmas shopping (in the rain) beckons. Software ODataLib 6.9.0 Release – Layla Liu Grunt and Gulp Intellisense in Web Essentials 2015 – Mads Kristensen Available now: December 2014 cumulative time zone update for Windows operating systems – ‘M3 Sweatt’ Orleans Goes Open Source – David Gristwood Information Razor views pre-compilation […]
At TechEd Australia 2014 in Sydney this year I presented a session titled “Build for the cloud, using the cloud: A look at Visual Studio Online”. This video is available on Microsoft’s Channel9 property for anyone interested in watching it. Here’s the session abstract. Configuring a development environment, including a version control repository and build environment, can be complicated and time consuming. Using Visual Studio Online, you can go from zero to online in just 40 minutes! Developers will love just how quick and easy getting started really is. In this demo-heavy session, we start from scratch and quickly build
I want to describe a method that I use to check if a user is a member of a group. Steps Call a REST webservice Reference MSDN for the correct API Build a RequestURL and a basic RequestHeader Figure out what the results mean Wrap it up in a Workflow Custom Activity API MSDN (
Originally posted on: http://geekswithblogs.net/akraus1/archive/2014/12/14/160652.aspx
When you want fast and efficient File IO in Windows you can specify a myriad of flags to CreateFile
. But which of these many flags help in which scenarios? MSDN says that some read ahead buffering is enabled if Sequential Scan is done. First a little look into the docs can help: FILE_FLAG_SEQUENTIAL_SCAN
0x08000000 Access is intended to be sequential from beginning to end. The system can use this as a hint to optimize file caching. This flag should not be used if read-behind (that
is, reverse scans) will be used. This flag has no effect if the file system does not support cached I/O and FILE_FLAG_NO_BUFFERING. For more information, see the Caching Behavior
section of this topic. Under Caching Behavior is more information: Specifying the FILE_FLAG_SEQUENTIAL_SCAN
flag can increase performance for applications that read large files using sequential access. Performance gains can be even more noticeable for applications that read large files mostly sequentially, but occasionally skip forward over small ranges of bytes. If an application...(Read whole news on source site)
NHibernate offers two interfaces that can be used to validate an entity before it is saved or updated or to cancel its saving, updating and deleting: IValidatable
. They are an alternative to events, and don’t need anything else to work other than be implemented by some entity.
Here’s what IValidatable
New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;">
1: public class Product : IValidatable
3: ...(Read whole news on source site)
It’s been a mad year and a half for me, one book out (Mastering Unity 2D Game Development), another book in its final stages, (An almost complete overhaul of book 1 thanks to gremlins) and a host of other family activities. I’ve just reached a nice break where I found …
The previous post showed a simple model casinos use to manipulate the odds. Instead of relying on the physical wheel for randomness, they rely on a virtual list of indexes that maps to the physical wheel.
Using that same model, it's easy to fiddle with the virtual indexes so that they map to misses right next to the winning pocket, creating "near misses". "Near misses" make players feel less like losing, since you "almost won". Casinos use this technique to get the next spin out of you.
Let's create more specific labels - a label for
each individual pocket.
The winning pocket is in the physical wheel at index two. We need the virtual indexes to make clusters next to the winning label. Four indexes map to Miss2, one maps to Win and three map to Miss3. We intentionally ignore Miss1.
Spinning the wheel one million times reveals the pattern; Miss1 gets ignored, while we hardly ever win but very often "just" miss.
Since the law states that randomness and visualization are two separate concepts, casinos are free to operate in this gray zone, as long as randomness stays untouched....(Read whole news on source site)
This week I was presented with an interesting challenge. Using this technique
, I used the whole screen for my app. The problem was I had not anticipated a Denim feature for the so called software buttons. For those unfamiliar with that – on the newest low and mid-tier phones the back, start and search buttons are not necessarily hardware buttons anymore, but can be a dedicated piece of screen that shows buttons. This enables hardware manufacturers to make phones for all platforms in one (hardware) package. Now the Denim firmware – that comes with the Lumia 73x and
83x - enables users to make those software buttons disappear – so the extra piece of screen can be used by the app itself. Pretty awesome. This can be done by using pressing a little arrow that appears on the left of the button bar:
It can be brought up again by swiping in from the bottom of the
screen. Pretty cool, but with a side effect I had not anticipated. If the application view bound mode is set to ApplicationViewBoundsMode.UseCoreWindow
in App.Xaml.cs the phone reports the whole screen size – not only the part that...(Read whole news on source site)
If anyone would have suggested to me a couple of years ago that Microsoft was not only going to release one of its major cash cows (e.g. Microsoft Office) on both iOS- and Android-based platforms, but would also provide developers … Continue reading →