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
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; |
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
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 |