This file contains hidden or 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
| /// <summary> | |
| /// Initializes a new instance of the <see cref="YOURREPORT" /> class. | |
| /// </summary> | |
| /// <param name="YOURPARAMETER">The YOURPARAMETER.</param> | |
| public YOURREPORTNAME(string YOURPARAM) | |
| { | |
| Filter userFilter = new Filter(); | |
| userFilter.Expression = "=Fields.YOURFIELD"; | |
| userFilter.Operator = FilterOperator.Equal; //CHOOSE YOUR OPERATOR HERE | |
| userFilter.Value = String.Format("={0}", YOURPARAM); |
This file contains hidden or 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
| using System; | |
| using System.IO; | |
| using System.Net; | |
| using System.Net.Http; | |
| using System.Net.Http.Formatting; | |
| using System.Net.Http.Headers; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using Newtonsoft.Json; |
This file contains hidden or 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
| <!-- _LAYOUT.CSHTML --> | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>@ViewBag.Title - My ASP.NET Application</title> | |
| @Styles.Render("~/Content/css") | |
| @Scripts.Render("~/bundles/modernizr") |
This file contains hidden or 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
| Get-ChildItem '[FULL PATH TO YOUR HTML FILE FOLDER]' *.html -recurse | | |
| Foreach-Object { | |
| $c = ($_ | Get-Content) | |
| $logFile = "[FULL PATH TO YOUR LOGFILE]"; | |
| $output = "Modifiying file: " + $_.FullName | |
| $output | out-file $LogFile -Append |
This file contains hidden or 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
| /// <summary> | |
| /// Validate zip code value | |
| /// using ISO country code. | |
| /// </summary> | |
| public class ZipCodeValidator | |
| { | |
| private Dictionary<string, string> countryList; | |
| public Dictionary<string, string> CountryList | |
| { |
This file contains hidden or 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
| áìêwˆóu…íV^²òØ0O¸*W.±d- | |
| ÃSdáoÆA–…'Ùð"ù³®ÙpXž=ÉÁú%u†b“hÓúY–ooY¢d7EÑšmÈ‹“8ÈXãÍ/ÛÜz*ìý’†£C4P’Ae…äÇ÷Éá÷{ÙQt´Á¦¹ÃR'ãNëÙø±ª | |
| RÐ.”F$Ïó"Éc©¨ÖIÁŒ"1bå»+çr?£ûo¹’âH^ScßðAç†_0oQ×EËgfP!"ÿP^²õDNÙÊÉõüηŽKTõ~—O6ô;1}Yw9…ƒ´«}Tw…\z09M&ã’ÝA¢Ïg§çH&OÊ×ÔØ9m&ÐE¢´×s„OØÐÚ¢$Š(%“g"«fú”7éÕc¡€ˆ'njŸ |
This file contains hidden or 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
| import os | |
| import glob | |
| import nude | |
| from nude import Nude | |
| path = '[Your image path]' | |
| for infile in glob.glob(os.path.join(path,'*.png')) : | |
| n = Nude(infile) | |
| n.parse() |
This file contains hidden or 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
| public class RequireHttpsWebApiAttribute : AuthorizationFilterAttribute | |
| { | |
| public override void OnAuthorization(System.Web.Http.Controllers.HttpActionContext actionContext) | |
| { | |
| if (actionContext.Request.RequestUri.Scheme != Uri.UriSchemeHttps) | |
| { | |
| actionContext.Response = new HttpResponseMessage(System.Net.HttpStatusCode.Forbidden) | |
| { | |
| ReasonPhrase = "HTTPS Required" |
This file contains hidden or 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
| $.ajax({ | |
| url: 'YOUR WEB API URL', | |
| type: 'POST/PUT/WHATEVER', | |
| dataType: 'json', | |
| contentType: 'application/json; charset=utf-8', //IMPORTANT! | |
| data: JSON.stringify(appId), | |
| success: function () { alert('COMPLETED!'); }, | |
| error: function (xhr, message, error) { | |
| alert(error); | |
| } |
This file contains hidden or 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
| protected IPAddress GetClientIp(HttpRequestMessage request) | |
| { | |
| if (request.Properties.ContainsKey("MS_HttpContext")) | |
| { | |
| IPAddress ipAddress; | |
| var ok = IPAddress.TryParse(((HttpContextBase)request.Properties["MS_HttpContext"]).Request.UserHostAddress,out ipAddress); | |
| if(ok) | |
| { |
OlderNewer