The initial source comes from sdcuike/issueBlog#4
https://github.com/PacktPublishing free to download books code by Packet
https://github.com/EbookFoundation/free-programming-books Very immense
https://github.com/PacktPublishing free to download books code by Packet
https://github.com/EbookFoundation/free-programming-books Very immense
public static class ConvertHelper | |
{ | |
//https://stackoverflow.com/questions/425389/c-sharp-equivalent-of-sql-server-datatypes | |
private static readonly Dictionary<string, string> DotNetMappingSqlServer = new Dictionary<string, string> { | |
{ "Byte[]", "VARBINARY" } , | |
{ "Byte", "BINARY" } , | |
{ "Boolean", "BIT" } , | |
{ "Char", "nvarchar(1)" } , | |
{ "DateTime", "DATETIME" } , | |
{ "Decimal", "DECIMAL" } , |
public class Entity | |
{ | |
public Guid Id { get; set; } | |
public string Name { get; set; } | |
public DateTime? CreateDate { get; set; } | |
public DateTime? LastUpdate { get; set; } | |
public bool IsActive { get; set; } | |
public bool Deleted { get; set; } | |
} |
public class MenuItem | |
{ | |
public int Id {get; set;} | |
public string Name {get; set;} | |
public IEnumerable<MenuItem> MenuItems {get;set;} | |
} | |
public interface IModelClass | |
{ | |
public Guid Id {get; set;} | |
} | |
public class BaseRepository<TEntity, TDto> : IRepository<TEntity, TDto> | |
where TEntity : class, IModelClass | |
where TDto :class, IModelClass | |
{ |
var FlatArray = (function(){ | |
var vm = this; | |
vm.row = []; | |
function CallFlatFunction(inputs) | |
{ | |
var result = FlatFunction(inputs); | |
vm.row = []; | |
return result; | |
} |
var PlainCalculator = (function() { | |
const ExpressionSide = { | |
LEFT: 0, | |
RIGHT:2 | |
}; | |
const ExpressionType = { | |
NUMBER: 0, |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
var getQueryVal = function(str) { | |
s = window.location.href; | |
var regexstr = new RegExp(str+'=','i'); | |
if (s.indexOf('?') !== -1) { | |
var result = s.substr(s.indexOf('?')+1,s.length).split('&').find(x => x.match(regexstr)); | |
if(result){ | |
return result.split('=')[1]; | |
}else{ |
function findTByKeyValue (element, target){ | |
var found = true; | |
for(var key in target) { | |
if (!element.hasOwnProperty(key) || element[key] !== target[key]) { | |
found = false; | |
break; | |
} | |
} | |
if(found) { |