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 util = require('util'); | |
| function insert(item, user, request) { | |
| var result; | |
| try | |
| { | |
| eval("result = " + item.code); | |
| request.respond(200, result); | |
| } | |
| catch(error) |
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
| [Fact] | |
| public void CanStartGameWithThreeOrMorePlayers() | |
| { | |
| foreach (var i in Enumerable.Range(1, 7)) | |
| { | |
| viewmodel.NewPlayerName = "Player" + i; | |
| viewmodel.AddPlayer.Execute(null); | |
| // Test passes with this assert present, fails with it commented out | |
| //Assert.Equal(i >= 3, viewmodel.StartGame.CanExecute(null)); |
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 memorySink = []; | |
| exports.post = function(request, response) { | |
| var sizeKB = request.query.kb || 1024; | |
| var entry = { size: sizeKB, buffer: new Buffer(sizeKB * 1024) }; | |
| memorySink.push(entry); | |
| response.send(statusCodes.OK); | |
| }; |
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 class NetworkActivityHandler : DelegatingHandler | |
| { | |
| protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) | |
| { | |
| using (new NetworkActivityDisposable()) | |
| { | |
| return base.SendAsync(request, cancellationToken); | |
| } | |
| } |
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
| Get started with Mobile Services: | |
| http://aka.ms/mobileservices | |
| Field Engineer Lite: | |
| http://github.com/paulbatum/FieldEngineerLite | |
| Full Field Engineer Sample (windows and xamarin): | |
| http://aka.ms/MobileFieldEngineer | |
| http://aka.ms/MobileFEXamarin |
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
| OK so you the alpha pack downloaded but you don't know how to run it? Here's how: | |
| 1. Download MultiMC http://multimc.org/ | |
| 2. Run MultiMC. It will create an instances folder inside the MultiMC folder. | |
| 3. Add your minecraft account details to MultiMC using the button in the top right. | |
| 4. Extract the alpha pack to the instances folder. Make sure you end up with a file structure like \MultiMC\instances\ME^-1\minecraft | |
| 5. In MultiMC click the refresh button. The downloaded pack should appear. | |
| 6. Double click the pack to run it. |
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
| if (AppSettings["MS_DatabaseSchemaName"] != null | |
| || AppSettings["MS_SchemaName"] != null | |
| || AppSettings["MS_Schemo"] != null | |
| || AppSettings["MS_TableSchema"] != null) | |
| { | |
| //God dammit Dale!! | |
| // do stuff | |
| } |
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 request = require('request'); | |
| module.exports = { | |
| "post": function (req, res, next) { | |
| req.azureMobile.user.getIdentity("google").then(function(result) { | |
| request.get('https://www.googleapis.com/plus/v1/people/me', { | |
| headers: { | |
| "Authorization": "Bearer " + result.google.access_token | |
| } | |
| }, function(err, apiResult) { |
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 class Functions | |
| { | |
| public static void ProcessQueueMessage([QueueTrigger("queue")] string message, TextWriter log) | |
| { | |
| log.WriteLine(message); | |
| } | |
| public static void CronJob([TimerTrigger("00:01:00")] TimerInfo timer, [Queue("queue")] out string outputQueueMessage) | |
| { | |
| outputQueueMessage = new Random().NextDouble().ToString(); |
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 fs = require('fs'); | |
| var path = require('path'); | |
| module.exports = function (context, req) { | |
| if (typeof req.query.name == 'undefined') { | |
| context.res = { | |
| status: 400, | |
| body: "Please specify the name of the function to enable" | |
| } | |
| } |