I hereby claim:
- I am alexshkor on github.
- I am alexshkor (https://keybase.io/alexshkor) on keybase.
- I have a public key ASCy8ZEQVu-av_-_k6j41hkYJDnkTzM6L8X49mS0DMKSxAo
To claim this, I am signing this object:
| pragma solidity ^0.4.17; | |
| contract AtomicSwap { | |
| enum State { Empty, Initiator, Participant } | |
| struct Swap { | |
| uint initTimestamp; | |
| uint refundTime; | |
| bytes20 hashedSecret; |
| #ifndef IS_TEST_NET | |
| + auto snapshot_path = string("./snapshot5392323.json"); | |
| + auto snapshot_file = fc::path(snapshot_path); | |
| + FC_ASSERT( fc::exists( snapshot_file ), "Snapshot file '${file}' was not found.", ("file", snapshot_file) ); | |
| + | |
| + std::cout << "Initializing state from snapshot file: "<< snapshot_file.generic_string() << "\n"; | |
| + | |
| + unsigned char digest[MD5_DIGEST_LENGTH]; | |
| + char snapshot_checksum [] = "081b0149f0b2a570ae76b663090cfb0c"; | |
| + char md5hash[33]; |
I hereby claim:
To claim this, I am signing this object:
| public struct Location : IBsonSerializable | |
| { | |
| public const double LatitudeMinValue = -90; | |
| public const double LatitudeMaxValue = 90; | |
| public const double LongitudeMinValue = -180; | |
| public const double LongitudeMaxValue = 180; | |
| private const double PIx = 3.141592653589793; | |
| public const double EarthRaduisInKm = 6378.16; | |
| public const double EarthRaduisInMiles = 3959; |
| [POST] | |
| public JsonResult UploadImage(HttpPostedFileBase uploadedFile) | |
| { | |
| var cloudinary = new CloudinaryDotNet.Cloudinary(ConfigurationManager.AppSettings.Get("cloudinary_url")); | |
| bool isValidImage; | |
| if (uploadedFile != null) | |
| { | |
| isValidImage = uploadedFile.IsValidImage(250, 250); | |
| } |
| protected JsonResult JsonModel<T>(T model) where T : BaseViewModel | |
| { | |
| model.Errors = GetErorsModel().ToList(); | |
| return Json(model); | |
| } | |
| protected IEnumerable<ValidationError> GetErorsModel() | |
| { | |
| foreach (var state in ModelState) | |
| { |
| var sendModel = function (url, model, successCallback, ignoreList) { | |
| model.Loading(true); | |
| var mapping = { | |
| ignore: ignoreList | |
| }; | |
| sendJson(url, ko.mapping.toJS(model,mapping), function(response) { | |
| var defaultBehaviour = true; | |
| if (successCallback) { | |
| var result = successCallback(response); | |
| if (result === false) { |
| var sendJson = function(url, json, callback){ | |
| var data = {}; | |
| parseValues(json, function(key, value) { | |
| data[key] = value; | |
| }); | |
| $.post(url, data,callback); | |
| }; | |
| var parseValues = function (data, callback, prefix, postfix) { |
| public class AmazonS3Helper | |
| { | |
| private readonly string _amazonAccessKey; | |
| private readonly string _amazonSecretKey; | |
| private const string BucketName = "zertisedpm"; | |
| public AmazonS3Helper(string amazonAccessKey, string amazonSecretKey ) | |
| { | |
| _amazonAccessKey = amazonAccessKey; | |
| _amazonSecretKey = amazonSecretKey; |
| using Newtonsoft.Json; | |
| namespace System.Web.Mvc | |
| { | |
| public static class HtmlHelperExt | |
| { | |
| private const string BaseApplyModelScriptString = @"<script type=""text/javascript""> | |
| $(function () {{ | |
| var model = new AllMessagesModel({0}); | |
| ko.applyBindings(model); |