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 WebApiApplication : System.Web.HttpApplication | |
| { | |
| protected void Application_Start() | |
| { | |
| // *** Other Configurations *** | |
| UnityConfiguration(GlobalConfiguration.Configuration); | |
| } | |
| public void UnityConfiguration(HttpConfiguration httpConfiguration) |
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
| $.ajaxSettings.traditional = true; // <-- Important | |
| $('#btn').click(function () { | |
| var array = []; | |
| var url = '/Controller/Action'; | |
| $.post(url, { array : array }); | |
| }); | |
| }); |
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
| function isNumberKey(evt) { | |
| var charCode = (evt.which) ? evt.which : event.keyCode; | |
| if (charCode > 31 && (charCode < 48 || charCode > 57)) | |
| return false; | |
| return true; | |
| } |
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
| function isLetterKey(evt) | |
| { | |
| evt = (evt) ? evt : event; | |
| var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : | |
| ((evt.which) ? evt.which : 0)); | |
| if (charCode > 31 && (charCode < 65 || charCode > 90) && | |
| (charCode < 97 || charCode > 122)) { | |
| return false; | |
| } | |
| return true; |
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.Collections.Generic; | |
| using System.Web.Mvc; | |
| using Microsoft.Practices.Unity; | |
| namespace Ukutool | |
| { | |
| public class UnityDependencyResolver : IDependencyResolver | |
| { | |
| private readonly IUnityContainer _container; |
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
| $(window).bind("load", function() { | |
| // code here | |
| }); |
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
| var bytes = Encoding.UTF8.GetBytes(sb.ToString()); | |
| Stream stream = new MemoryStream(bytes); | |
| stream.Flush(); | |
| stream.Position = 0; | |
| Response.ContentType = "text/plain"; | |
| Response.AppendHeader("content-disposition", "attachment;filename=exportacao"); | |
| return new FileStreamResult(stream, "text/plain"); |
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
| var mili = Data.replace('Date', '').replace('/', '').replace('(', '').replace(')', '').replace('/', ''); | |
| var dataJavascript = new Date(eval(mili)); | |
| var realDate = dataJavascript.toLocaleDateString(); |
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
| value.toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1.") |
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
| var emailRegExp = /^[A-Z0-9._%+-]+@@[A-Z0-9.-]+\.[A-Z]{2,4}$/i; | |
| var validaEmail = emailRegExp.test(input.val()); |
OlderNewer