I tried to write a function that would flatten nested arrays but my solution
did not work when I used the Array.prototype.concat
method. As a work around,
I used the Array.prototype.forEach
method and it worked as expected. Both
implimentations are below.
Does you know why .concat()
doesn't work?
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 _ext = {}; | |
var _ = require('underscore'); | |
_ext = _.extend(_ext, require('./one')); | |
_ext = _.extend(_ext, require('./two')); | |
module.exports = _ext; |
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
sp_configure 'show advanced options', 1; | |
GO | |
sp_configure 'lightweight pooling', 0; | |
GO | |
RECONFIGURE; | |
GO |
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 data = $(form).serialize(); | |
var url = $(form).attr('action'); | |
$.ajax({ | |
type: 'POST', | |
url: url, | |
cache: false, | |
data: data, | |
success: function (result) { | |
$(form).closest('.element').html(result); |
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 FormQuestion | |
{ | |
public decimal sort { get; set; } | |
public bool IsAmount { get; set; } | |
public bool IsLevelBreak { get; set; } | |
[JsonIgnore] | |
[DisplayName("Check to delete.")] | |
public bool Delete { get; set; } |