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 storage = { | |
"passenger": { | |
"properties": { | |
"firstName": "", | |
"lastName": "", | |
"email": {}, | |
"birthDate": { | |
"day": 0, | |
"month": 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
<?xml version="1.0" encoding="UTF-8" ?> | |
<passenger> | |
<properties> | |
<firstName></firstName> | |
<lastName></lastName> | |
<email /> | |
<birthDate> | |
<day>0</day> | |
<month>0</month> | |
<year>0</year> |
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
{ | |
"passenger": { | |
"properties": { | |
"firstName": "", | |
"lastName": "", | |
"email": {}, | |
"birthDate": { | |
"day": 0, | |
"month": 0, | |
"year": 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
var parsePattern = function(pattern) { | |
var placeholders = []; | |
var substrings = []; | |
var putSubstring = function(startPosition, endPosition, isPlaceholder) { | |
var substring = pattern.substring(startPosition, endPosition); | |
if (substring.length > 0) { | |
substrings.push(substring); | |
if (isPlaceholder) { | |
placeholders.push(substrings.length - 1); |
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 object = { | |
1: "lorem", | |
2: "ipsum", | |
3: "dolor", | |
4: "sit", | |
5: "amet" | |
}; | |
var calculateKeyPosition = function(object, key) { | |
var props = Object.getOwnPropertyNames(object); |
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
[ | |
{ | |
"firstName": "Ivan", | |
"lastName": "Ivanov", | |
"number": 13873214, | |
"birthData": "10.10.1980" | |
}, | |
{ | |
"firstName": "Ivan", | |
"lastName": "Iva^1-.", |
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.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace TravelAgency.Infrastructure.Pooling | |
{ | |
public sealed class ResourcePool<T> : IDisposable |
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.Text; | |
using System.Threading.Tasks; | |
namespace TrainSelector | |
{ | |
class Program | |
{ |
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 NUnit.Framework; | |
using Rhino.Mocks; | |
using TravelAgency.Infrastructure; | |
using TravelAgency.Infrastructure.Pooling; | |
namespace TravelAgency.Tests | |
{ |
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 Railway = Railway || {}; | |
(function(Railway) { | |
var Train = function(settings) { | |
settings = settings || {}; | |
this.mainCoupeSize = settings.mainCoupeSize || 4; | |
this.leftCoupeSize = settings.leftCoupeSize || 2; | |
this.coupeCount = settings.coupeCount || 9; |