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 BookingItemReorderHelper | |
{ | |
public static Dictionary<DateTime, List<SimpleBookingItem>> Reorder(Dictionary<DateTime, List<SimpleBookingItem>> dates) | |
{ | |
foreach (var date in dates) | |
{ | |
var temp = date.Value.Reorder(); | |
date.Value.Clear(); | |
date.Value.AddRange(temp); |
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
@using ARCode.Web.Areas.Admin.Models.Components | |
@model ARCode.Web.Areas.Admin.Models.Components.FileSelectorSettings | |
<div class="btn-group" role="group" aria-label="..."> | |
@if (Model.EnableFileSelect) | |
{ | |
<button class="btn @Model.FileSelectButtonCssClass " data-toggle="modal" data-target="#@(Model.FileSelectIdPrefix)FileSelectModal">@Html.Raw(Model.FileSelectButtonText)</button> | |
} | |
@if (Model.EnableFileUpload) | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
namespace Helpers | |
{ | |
/// ref: http://stackoverflow.com/a/3514775/959245 | |
public static class GroupingHelper | |
{ |
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
using Newtonsoft.Json; | |
internal sealed class AuthToken | |
{ | |
[JsonProperty("access_token")] // using Newtonsoft.Json => JsonProperty; | |
public string AccessToken { get; set; } | |
[JsonProperty("token_type")] | |
public string TokenType { 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
using System.Linq; | |
using System.Threading.Tasks; | |
using Oklo.BookingService.Core.Booking.Data.Responses; | |
using Oklo.BookingService.Core.Booking.Engine; | |
using Oklo.BookingService.Core.Exceptions; | |
using Oklo.BookingService.Domain.Models.Booking; | |
using Oklo.BookingService.Domain.Models.Commands; | |
using Oklo.BookingService.Domain.Models.Results; | |
using Oklo.Core.Framework.Commands; | |
using Oklo.Core.Utils.Extensions; |
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
Credits/Ref: http://johnnycode.com/2014/03/27/using-jquery-validate-plugin-html5-data-attribute-rules/ | |
(Tested, core) | |
data-rule-required="true" | |
data-rule-email="true" | |
(Untested, core, but should work) | |
data-rule-url="true" | |
data-rule-date="true" |
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
package com.esoftdive.core.smpp.internal; | |
import java.util.Random; | |
import com.cloudhopper.commons.charset.CharsetUtil; | |
import com.cloudhopper.smpp.SmppConstants; | |
import com.cloudhopper.smpp.SmppSession; | |
import com.cloudhopper.smpp.pdu.SubmitSm; | |
import com.cloudhopper.smpp.type.Address; |
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
/// <summary> | |
/// A listing of ASCII control characters for readability. | |
/// </summary> | |
public static class AsciiControlChars | |
{ | |
/// <summary> | |
/// Usually indicates the end of a string. | |
/// </summary> | |
public const char Nul = (char)0x00; |
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
<!-- this is a sample XML generated by the trigger --> | |
<dbo.TestGroup> | |
<row user="romeshnr" type="U" timestamp="2015-11-23T10:06:30.913"> | |
<TestGroupID>1</TestGroupID> | |
<Name old="Performance" new="System Performance" /> <!-- notice the update --> | |
</row> | |
<row user="dirnthelord" type="U" timestamp="2015-11-23T10:06:30.913"> | |
<TestGroupID>6</TestGroupID> <!-- user tried to update without any changes! --> | |
</row> |
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
/// <summary> | |
/// Bind the alias to relevant property so that incoming property name and JSON serialized property name will be different. | |
/// </summary> | |
/// <remarks> | |
/// The reason for not using <see cref="Newtonsoft.Json.Serialization.JsonProperty"/> is that when serialized, property name | |
/// is not the one we defined in our class. | |
/// for BindAlias class see here: https://github.com/schotime/SchoStack/blob/master/SchoStack.Web/AliasBinding.cs | |
/// </remarks> | |
[ModelBinder(typeof(AliasApiModelBinder<HotelSearchParameters>))] | |
public class HotelSearchParameters |