volatile vs. mutable in C++

A mutable field can be changed even in an object accessed through a const pointer or reference, or in a const object, so the compiler knows not to stash it in R/O memory. A volatile location is one that can be changed by code the compiler doesn’t know about (e.g. some kernel-level driver), so the …

Read more

How do I use Travis-CI with C# or F#

See danielnixon’s answer for the official way to do this now. It is possible. 1. Your project needs to work on Mono On your own mono machine, using the terminal, cd into your solution directory and running the command xbuild. This may automatically work, or it may not, as there are features you used in …

Read more

Getting the index of a particular item in array

You can use FindIndex var index = Array.FindIndex(myArray, row => row.Author == “xyz”); Edit: I see you have an array of string, you can use any code to match, here an example with a simple contains: var index = Array.FindIndex(myArray, row => row.Contains(“Author=”xyz””)); Maybe you need to match using a regular expression?

Could not load file or assembly ‘System.ValueTuple’

ok this feels completely wrong but I cut <dependentAssembly> <assemblyIdentity name=”System.ValueTuple” publicKeyToken=”cc7b13ffcd2ddd51″ culture=”neutral” /> <bindingRedirect oldVersion=”0.0.0.0-4.0.3.0″ newVersion=”4.0.3.0″ /> </dependentAssembly> This out of my web.config for the main application. I was really just seeing what happened to see if there was an underlying dependency or something, not expecting it to run. It just carried on working, …

Read more