Skip to content

Instantly share code, notes, and snippets.

function minVersion(version) {
var $vrs = window.jQuery.fn.jquery.split('.'),
min = version.split('.'),
prevs=[];
for (var i=0, len=$vrs.length; i<len; i++) {
console.log($vrs[i], min[i], prevs[i-1]);
if (min[i] && $vrs[i] < min[i]) {
if (!prevs[i-1] || prevs[i-1] == 0)
return false;
private static int GetRoleInstanceNumber()
{
var roleInstanceId = RoleEnvironment.CurrentRoleInstance.Id;
var li1 = roleInstanceId.LastIndexOf(".");
var li2 = roleInstanceId.LastIndexOf("_");
var roleInstanceNo = roleInstanceId.Substring(Math.Max(li1, li2) + 1);
return Int32.Parse(roleInstanceNo);
}
string connectionString = // Your connection string