CSHARP
var UFs = "AC AL AP AM BA CE DF ES GO MA MT MS MG PR PB PA PE PI RJ RN RS RO RR SC SE SP TO".Split(' ');JAVASCRIPT
var UFs = "AC AL AP AM BA CE DF ES GO MA MT MS MG PR PB PA PE PI RJ RN RS RO RR SC SE SP TO".split(' ');| function r(f){/in/.test(document.readyState)?setTimeout('r('+f+')',9):f()} |
| /** | |
| * Cross Browser helper to addEventListener. | |
| * | |
| * @param {HTMLElement} obj The Element to attach event to. | |
| * @param {string} evt The event that will trigger the binded function. | |
| * @param {function(event)} fnc The function to bind to the element. | |
| * @return {boolean} true if it was successfuly binded. | |
| */ | |
| var cb_addEventListener = function(obj, evt, fnc) { | |
| // W3C model |
| // http://stackoverflow.com/a/5913807 | |
| if(/msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent)) { | |
| var IEBinaryToArray_ByteStr_Script = | |
| "<!-- IEBinaryToArray_ByteStr -->\r\n"+ | |
| "<script type='text/vbscript'>\r\n"+ | |
| "Function IEBinaryToArray_ByteStr(Binary)\r\n"+ | |
| " IEBinaryToArray_ByteStr = CStr(Binary)\r\n"+ | |
| "End Function\r\n"+ | |
| "Function IEBinaryToArray_ByteStr_Last(Binary)\r\n"+ |
| private static char Hex(int ix) | |
| { | |
| if (ix < 10) | |
| { | |
| return (char)(ix + 48); | |
| } | |
| return (char)(ix - 10 + 65); | |
| } |
| emptyImage:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=" |
| (function (d) { | |
| if (typeof jQuery != 'undefined') { | |
| s = d.createElement('script'); | |
| s.src = 'https://code.jquery.com/jquery-1.12.4.min.js'; | |
| s.type = 'type/javascript'; | |
| d.getElementsByTagName('head')[0].appendChild(s); | |
| alert(jQuery.fn.jquery); | |
| } | |
| })(document); |
| powershell "(new-object net.webclient).DownloadFile('https://nuget.org/nuget.exe', 'nuget.exe')" |
| set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 0 |
| var currentUserIsMemberOf = function(groupName){ | |
| var found = false; | |
| var dfd = $.Deferred(function(){ | |
| SP.SOD.executeOrDelayUntilScriptLoaded(function(){ | |
| context = new SP.ClientContext.get_current(); | |
| allGroups = context.get_web().get_siteGroups(); | |
| context.load(allGroups); | |
| context.load(allGroups, 'Include(Users)'); | |
| context.executeQueryAsync( |