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
Create.Table("AspNetRoles") | |
.WithColumn("Id").AsString().PrimaryKey("PK_AspNetRoles").NotNullable() | |
.WithColumn("ConcurrencyStamp").AsString().Nullable() | |
.WithColumn("Name").AsString(256).NotNullable() | |
.WithColumn("NormalizedName").AsString(256).Nullable() | |
.Indexed("RoleNameIndex"); | |
Create.Table("AspNetUserTokens") | |
.WithColumn("UserId").AsString().PrimaryKey("PK_AspNetUserTokens").NotNullable() |
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 static class ExampleViewHolder extends RecyclerView.ViewHolder | |
implements View.OnClickListener { | |
private int originalHeight = 0; | |
private boolean isViewExpanded = false; | |
private YourCustomView yourCustomView | |
public ExampleViewHolder(View v) { | |
super(v); | |
v.setOnClickListener(this); |
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
[alias] | |
prep = !git clean -ffd && git submodule foreach 'git reset --hard && git clean -ffd && git fetch --all' && git submodule update --init | |
lg = log --graph --date-order --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
pr = pull --rebase | |
[difftool "kdiff3"] | |
path = C:/Program Files/KDiff3/kdiff3.exe | |
trustExitCode = false | |
[difftool] |
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
### Check me into the root of the repo | |
### as .gitattributes | |
*.doc diff=astextplain | |
*.DOC diff=astextplain | |
*.docx diff=astextplain | |
*.DOCX diff=astextplain | |
*.dot diff=astextplain | |
*.DOT diff=astextplain |
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
$.validator.setDefaults({ | |
highlight: function (element) { | |
$(element).closest(".control-group").addClass("error"); | |
}, | |
unhighlight: function (element) { | |
$(element).closest(".control-group").removeClass("error"); | |
} | |
}); | |
$(function () { | |
$('span.field-validation-valid, span.field-validation-error').each(function () { |
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
/* | |
Please remove this comment only after placing this template to ReSharper template editor. | |
Existance of this comment during paste will automatically align macroses in shown order. | |
Macroses: | |
$Entity$ - EntityName | |
$entity$ - entityName | |
$entity_in_when_part$ - entity_name | |
$entities_in_when_part$ - entity_name_in_plural | |
$usage_of_initial_parameters_in_ctor$ - arguments of factory method supplied to constructor |
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
// NHibernate mapping-by-code naming convention resembling Fluent's | |
// See the blog post: http://notherdev.blogspot.com/2012/01/mapping-by-code-naming-convention.html | |
public class ModelMapperWithNamingConventions : ConventionModelMapper | |
{ | |
public const string ForeignKeyColumnPostfix = "_id"; | |
public const string ManyToManyIntermediateTableInfix = "To"; | |
public const char ElementColumnTrimmedPluralPostfix = 's'; | |
private readonly List<MemberInfo> _ignoredMembers = new List<MemberInfo>(); |
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 static class GenericHelpers | |
{ | |
public static HtmlTemplate HtmlTemplate(this HtmlHelper html, object htmlAttributes) | |
{ | |
return new HtmlTemplate(html, htmlAttributes); | |
} | |
} |
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
Choose a ticket class: <select id="tickets"></select> | |
<p id="ticketOutput"></p> | |
<script id="ticketTemplate" type="text/x-jquery-tmpl"> | |
{{if chosenTicket}} | |
You have chosen <b>${ chosenTicket().name }</b> | |
($${ chosenTicket().price }) | |
<button data-bind="click: resetTicket">Clear</button> | |
{{/if}} |