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 void DownloadAndReadMetadata(int imageId) | |
| { | |
| // Get scheduled image from db | |
| var image = _context.ScheduledImages.Find(imageId); | |
| // Download file | |
| var stream = _downloader.Download(image.DownloadUrl); | |
| // Read metadata | |
| var metadata = _reader.ReadFromStream(stream); |
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 void Post([FromBody]AssetApiModel assetApiModel) | |
| { | |
| var imageMetadata = SaveScheduleImageEndity(assetApiModel); // Here we just save the entity to the db which should be a quick operation | |
| _backgroundJobClient.Enqueue(() => helper.DownloadAndReadMetadata(imageMetadata.Id)); // The background job will grab the image's url from the db and then do its magic. | |
| } |
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
| [assembly: OwinStartup(typeof(YourProject.Startup))] | |
| namespace YourProject | |
| { | |
| public partial class Startup | |
| { | |
| public void Configuration(IAppBuilder app) | |
| { | |
| GlobalConfiguration.Configuration.UseSqlServerStorage("DefaultConnection"); | |
| app.UseHangfireDashboard(); |
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
| GlobalConfiguration.Configuration.UseSqlServerStorage("DefaultConnection"); | |
| ... | |
| app.UseHangfireDashboard(); | |
| app.UseHangfireServer(); |
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
| DivisionHelper = {}; | |
| DivisionHelper.parse = function (val) { | |
| var operands = val.split('/'); | |
| return operands[0]/operands[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
| test("division_parse", function(assert) { | |
| var result = DivisionHelper.parse('1/2'); | |
| assert.equal(result, 0.5) | |
| }); |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>QUnit Example</title> | |
| <link rel="stylesheet" href="http://{path-to-your-install}/qunit/qunit-1.15.0.css"> | |
| </head> | |
| <body> | |
| <div id="qunit"></div> | |
| <div id="qunit-fixture"></div> |
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 sequence = new ui.Sequence(); | |
| sequence.clear() | |
| .do(this.mainTitleActor, this.showUpTween) | |
| .at('+=150') | |
| .do(this.subTitleActor, this.showUpTween) | |
| .start(); |
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 showUpTween = new ui.Tween({ | |
| values: { | |
| y: 0, | |
| opacity: 1 | |
| }, | |
| duration:600 | |
| }); |
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 initialValues = { | |
| y:40, | |
| opacity:0 | |
| } | |
| var mainTitleActor = new ui.Actor({ | |
| element: "#main-title", | |
| values: initialValues | |
| }); |