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
UpdateSaveMessage = () -> | |
[cls, message] = | |
if $("#Entry_Status").val() == "Draft" | |
["warning", "saved as a draft"] | |
else | |
[ | |
"info", | |
"posted to your blog, and published " + | |
if $("#publish-on-date").val().length | |
"on " + $("#publish-on-date").val() + " at " + ($("#publish-on-time").val() || "12:00 pm") |
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
UpdateSaveMessage = function () { | |
var _a, cls, message; | |
_a = $("#Entry_Status").val() === "Draft" ? ["warning", "saved as a draft"] : ["info", "posted to your blog, and published " + ($("#publish-on-date").val().length ? "on " + $("#publish-on-date").val() + " at " + ($("#publish-on-time").val() || "12:00 pm") : "immediately")]; | |
cls = _a[0]; | |
message = _a[1]; | |
return $("#save-message").text(message).parent(".submit-row").attr("class", cls + " submit-row"); | |
}; |
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; | |
namespace ConsoleApplication61 | |
{ | |
class Vector | |
{ | |
public int X { get; private set; } | |
public Vector() { } |
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
#include <iostream> | |
#include <string> | |
class CanOnlyGuess2 | |
{ | |
private: | |
int _channelPerNameCount; | |
std::string _channel; | |
std::string _prevName; |
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
public string GetMimeTypeForFile(string filename) | |
{ | |
var mime = "application/octetstream"; | |
var ext = System.IO.Path.GetExtension(filename).ToLower(); | |
var rk = Microsoft.Win32.Registry.ClassesRoot.OpenSubKey(ext); | |
if (rk != null && rk.GetValue("Content Type") != null) | |
mime = rk.GetValue("Content Type").ToString(); | |
return mime; | |
} |
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
%ul.site-navigation | |
%li != Html.RouteLink("Dashboard").Dashboard | |
%li != Html.RouteLink("Projects").ListProjects | |
%li != Html.RouteLink("Account").Account | |
%li != Html.RouteLink("Logout").Logout | |
... | |
-foreach (var project in Model.Projects) | |
%tr |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration> | |
<configSections> | |
</configSections> | |
<appSettings> | |
<add key="AccessToken" value="" /> | |
<add key="AccessTokenSecret" value="" /> | |
<add key="RequestToken" value="" /> | |
</appSettings> | |
</configuration> |
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
[EnsureCustomerLoggedIn] | |
public ActionResult Download(Guid assetId) | |
{ | |
var asset = _assets.GetAsset(assetId); | |
if (asset == null) | |
return Redirect(Url.RouteCatalog()); | |
var filePath = _uploads.GetAbsolutePathForFile(asset.FileId.UploadId); | |
return File(filePath, _mimeTypes.GetMimeTypeForFile(filePath), asset.Name + Path.GetExtension(filePath)); | |
} |
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.Linq; | |
using System.Collections.Generic; | |
using System.Reflection; | |
using FluentNHibernate.Automapping; | |
using FluentNHibernate.Cfg; | |
using FluentNHibernate.Conventions; | |
using FluentNHibernate.Conventions.Helpers; | |
using FluentNHibernate.Conventions.Instances; | |
using FluentNHibernate.MappingModel; |
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
class SanguineBond : CastableCard, IEnchantment, IEventHandler<PlayerLifeChanged> | |
{ | |
public SanguineBond() | |
{ | |
Name = "Sanguine Bond"; | |
ManaCost = Manacost.Create(black: 4, collorless: 2); | |
Description = "Whenever you gain life, target opponent loses that much life."; | |
} | |
public void Handle(PlayerLifeChanged @event) |
OlderNewer