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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
.icon-searchglass { | |
font-family: 'deersoIcons'; | |
speak: none; | |
font-style: normal; | |
font-weight: normal; | |
font-variant: normal; | |
text-transform: none; | |
line-height: 1; | |
-webkit-font-smoothing: antialiased; | |
} |
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 CategoryFullPathRepository : ICategoryFullPathRepository | |
{ | |
protected DbContext DbContext { get; set; } | |
public CategoryFullPathRepository(DbContext dbContext) | |
{ | |
DbContext = dbContext; | |
} | |
public IEnumerable<CategoryFullPath> GetAllPaths() | |
{ | |
return DbContext.Database.SqlQuery<CategoryFullPath>("SELECT * FROM [Main].[Catalog].[vCategoryFullPath]"); |
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
namespace Deerso.Domain.Models | |
{ | |
public class CategoryFullPath | |
{ | |
public CategoryFullPath() | |
{ | |
} | |
public int Id { get; set; } | |
public string Name { get; set; } |
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 AccountController : Controller | |
{ | |
public IFormsAuthenticationService FormsService { get; set; } | |
public IMembershipService MembershipService { get; set; } | |
protected override void Initialize(RequestContext requestContext) | |
{ | |
if (FormsService == null) { FormsService = new FormsAuthenticationService(); } | |
if (MembershipService == null) { MembershipService = new AccountMembershipService(); } |
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
@mixin gradient($from, $to) { | |
/* fallback/image non-cover color */ | |
background-color: $from; | |
/* Firefox 3.6+ */ | |
background-image: -moz-linear-gradient($from, $to); | |
/* Safari 4+, Chrome 1+ */ | |
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from($from), to($to)); | |
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($) { | |
$.fn.nodoubletapzoom = function() { | |
$(this).bind('touchstart', function preventZoom(e) { | |
var t2 = e.timeStamp | |
, t1 = $(this).data('lastTouch') || t2 | |
, dt = t2 - t1 | |
, fingers = e.originalEvent.touches.length; | |
$(this).data('lastTouch', t2); | |
if (!dt || dt > 500 || fingers > 1) return; // not double-tap |
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
class Foo { | |
public int Value { get; set; } | |
} | |
class Bar { | |
public int Value { get; set; } | |
} | |
static class Program { | |
static void Main() { | |
Expression<Func<Foo, bool>> predicate = | |
x => x.Value % 2 == 0; |
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
private IObservable<List<Client>> GetClients() | |
{ | |
var request = new RestRequest("client/", Method.GET); | |
var subject = new AsyncSubject<List<Client>>(); | |
_restClient.ExecuteAsync<ClientResponseDTO>(request, response => | |
{ | |
subject.OnNext(response.Data.Entities); | |
subject.OnCompleted(); | |
}); |
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 self = this; | |
var uglyVm = { | |
object1 : ko.observable("hello there"), | |
object2 : ko.observable(new (function () { | |
var self = this; | |
self.subObject1 = ko.observable("goodbye now"); | |
})(self)) | |
}; |
OlderNewer