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 capitaliseFirstLetter(string) | |
{ | |
return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase(); | |
} | |
angular.module('pocketParty.services') | |
.service('CityDataService', function($q, $timeout) { | |
var cityData = [ | |
'Москва' |
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 Contract | |
{ | |
public static void Requires<T>(Func<bool> condition) where T : Exception, new() | |
{ | |
if(!condition.Invoke()) | |
{ | |
throw new T(); | |
} | |
} | |
} |
NewerOlder