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
//My answer Stackoverflow | |
// http://stackoverflow.com/a/30301335/2545964 | |
function baseAjaxCall(option, sCb) { | |
var ajaxOptions = { | |
method: option.method || "GET", | |
url: option.url, | |
dataType: option.dataType || "xml", | |
success : function(data) { | |
var root = $($.parseXML(data)).find("Response"); |
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 ($) { | |
var APP = function () { | |
this.permanentId = $('.permanentId'); | |
this.table = $('table'); | |
this.lockButton = $('.btn-lock'); | |
}; | |
APP.prototype.start = function () { | |
var self = this; | |
this.permanentId.on("click", function () { |
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 ($) { | |
/** | |
* @function | |
* @property {object} jQuery plugin which runs handler function once specified element is inserted into the DOM | |
* @param {function} handler A function to execute at the time when the element is inserted | |
* @param {bool} shouldRunHandlerOnce Optional: if true, handler is unbound after its first invocation | |
* @example $(selector).waitUntilExists(function); | |
*/ |
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
[Authorize] | |
public ActionResult Export() { | |
try | |
{ | |
var fileDownloadName = "FileName-" + DateTime.Now.ToShortDateString() + ".xlsx"; | |
const string contentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; | |
var clients = this._clientsRepository.Get(); | |
var package = new ExcelPackage(); |
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
//GET COOKIE | |
var authCookie = _loginHelper.GetAuthCookie(email, password); | |
//SERIELIZE JSON | |
var jsonDetails = JsonConvert.SerializeObject(details); | |
//RESPONSE | |
var response = _portfolioHelper.HttpPost( _path, jsonDetails, authCookie); | |
var result = JsonConvert.DeserializeObject<Response<int?>>(response); |
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
using System; | |
using System.Collections; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http.Formatting; | |
using System.Net.Http.Headers; | |
using System.Reflection; |
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
// Based on https://github.com/jaubourg/ajaxHooks/blob/master/src/ajax/xdr.js | |
(function( jQuery ) { | |
if ( window.XDomainRequest && !jQuery.support.cors ) { | |
jQuery.ajaxTransport(function( s ) { | |
if ( s.crossDomain && s.async ) { | |
if ( s.timeout ) { | |
s.xdrTimeout = s.timeout; | |
delete s.timeout; |
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
$(document).ready(function () { | |
$.tablesorter.themes.bootstrap = { | |
// these classes are added to the table. To see other table classes available, | |
// look here: http://getbootstrap.com/css/#tables | |
table: 'table table-bordered table-striped', | |
caption: 'caption', | |
// header class names | |
header: 'bootstrap-header', // give the header a gradient background (theme.bootstrap_2.css) | |
sortNone: '', | |
sortAsc: '', |
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
"use strict"; | |
var gulp = require('gulp'), | |
jshint = require('gulp-jshint'), | |
browserSync = require('browser-sync'), | |
runSequence = require('run-sequence'), | |
reload = browserSync.reload; | |
gulp.task('lint', function() { | |
return gulp.src('./app/**/*.js') |
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
using Ninject; | |
using MMWebsites.DAL.Helpers; | |
using MMWebsites.DAL.Repository; | |
using MMWebsites.Global.Contracts; | |
using MMWebsites.Global.Helpers; | |
namespace MMWebsites.IoC | |
{ | |
public class DependencyInjectionProvider |