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
<script> | |
setInterval(function () { | |
$.get("/", null, function () {}); | |
}, 10000); | |
</script> |
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 (purchasing, $) { | |
//Private Property | |
var options = {}; | |
//Public Property | |
purchasing.AddressData = { Id: null, Name: 'Default' }; | |
//Public Method | |
purchasing.options = function (o) { | |
$.extend(options, o); |
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
SELECT *, | |
'new { account = "'+CHART_NUM+'-'+ACCT_NUM+'", subaccount = "'+SUB_ACCT_NUM+'", name = "'+SUB_ACCT_NAME+'"},' | |
FROM OPENQUERY(FIS_DS_PROD, ' | |
SELECT CHART_NUM | |
,ACCT_NUM | |
,SUB_ACCT_NUM | |
,ACCT_NAME | |
,SUB_ACCT_NAME | |
FROM FINANCE.SUB_ACCOUNT | |
WHERE CHART_NUM = ''3'' AND FISCAL_YEAR = 9999 AND FISCAL_PERIOD = ''--'' |
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
purchasing.validateLineItem = function () { | |
$(".line-item-row").each(function () { | |
var row = $(this); | |
var hasQuantity = purchasing.cleanNumber(row.find(".quantity").val()) !== ''; | |
var hasPrice = purchasing.cleanNumber(row.find(".price").val()) !== ''; | |
var hasDescription = row.find(".description").val().trim() !== ''; | |
if (hasQuantity || hasPrice || hasDescription) { | |
row.find(".quantity").toggleClass("line-item-ok", hasQuantity).toggleClass("line-item-warning", !hasQuantity); | |
row.find(".description").toggleClass("line-item-ok", hasDescription).toggleClass("line-item-warning", !hasDescription); |
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
Imports DataAnnotationsExtensions.ClientValidation | |
<Assembly: WebActivator.PreApplicationStartMethod(GetType(App_Start.RegisterClientValidationExtensions), "Start")> | |
Namespace App_Start | |
Public NotInheritable Class RegisterClientValidationExtensions | |
Private Sub New() | |
End Sub | |
Public Shared Sub Start() | |
DataAnnotationsModelValidatorProviderExtensions.RegisterValidationExtensions() |
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
Imports DataAnnotationsExtensions.ClientValidation | |
Public Class MvcApplication | |
Inherits System.Web.HttpApplication | |
Shared Sub RegisterGlobalFilters(ByVal filters As GlobalFilterCollection) | |
filters.Add(New HandleErrorAttribute()) | |
End Sub | |
Shared Sub RegisterRoutes(ByVal routes As RouteCollection) |
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
public ActionResult Users() | |
{ | |
var users = | |
_repositoryFactory.UserRepository.Queryable.Where( | |
x => x.Id == "pgang" || x.Id == "anlai" || x.Id == "postit").ToList(); | |
return Content(WriteUsers(users), "text/plain"); | |
} |
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
<script src="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl("~/Scripts/js")"></script> | |
<link href="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl("~/Content/css")" rel="stylesheet" type="text/css" /> |
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
## Creating a branch and working on a remote branch | |
git checkout -b superfunbranchname | |
## This puts you onto a new branch with the given name | |
## Do work, commit changes, etc. | |
git push origin superfunbranchname | |
## This pushed your branch so others can get to that code |
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
$.getJSON(url, { id: orderId, orderStatusCodeId: role }, function (result) { | |
var ul = $("#myul"); | |
$(result).each(function(){ | |
ul.append($("<li>").text(this)); | |
}); | |
}); |