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.Collections.Generic; | |
| using System.Linq; | |
| using NUnit.Framework; | |
| namespace BadChars.Tests | |
| { | |
| [TestFixture] | |
| public class BadCharsTests | |
| { | |
| [Test] |
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 (componentMapping != null) | |
| { | |
| mapping.CompositeElement = componentMapping.GetCompositeElementMapping(); | |
| mapping.Relationship = null; // HACK: bad design | |
| } | |
| // HACK: Index only on list and map - shouldn't have to do this! | |
| if (indexMapping != null && mapping is IIndexedCollectionMapping) | |
| ((IIndexedCollectionMapping)mapping).Index = indexMapping; |
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
| IList<string> list = new [] { "I", "declare", "you", "are", "mistaken", "sir" }; | |
| IEnumerable<string> youProposeIShouldNotBeAbleToDoThis = list; | |
| // For the above code to work, IList<T> must inherit from IEnumerable<T>, i.e. interface inheritance must exist. |
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; | |
| namespace InterfaceInheritanceMocking | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) |
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
| game.input = (($, game) -> | |
| updatePlayEnabled = -> | |
| if($('#namebox').val().length == 0) | |
| $('#playbutton').attr('disabled', 'disabled') | |
| else | |
| $('#playbutton').removeAttr('disabled') | |
| bindKeyboardControls = (websocket) -> | |
| moveKeyMap = | |
| Down: ['down', 's'] |
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
| window.game = (($, JSON) -> | |
| updateScoreboard = (gameState) -> | |
| $('#scoreboard').html('SCORES<br/><br/>') | |
| for name, player of gameState.players | |
| $('<div>') | |
| .html(name + ': ' + player.score) | |
| .css('color', player.color) | |
| .appendTo($('#scoreboard')) |
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
| private void DisconnectClient(string clientId) | |
| { | |
| ChatUser user = _service.DisconnectClient(clientId); | |
| // There's no associated user for this client id | |
| if (user == null) | |
| { | |
| return; | |
| } |
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
| // TypeScript declaration file for Windows Azure Mobile Services server scripts | |
| // WORK IN PROGRESS | |
| interface ZumoError { | |
| } | |
| interface StatusCodes { | |
| OK: number; | |
| NOT_FOUND: number; |
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
| <foo> | |
| this is from the script | |
| </foo> | |
| this is from a module |
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
| while(true) | |
| { | |
| try | |
| { | |
| var url = "http://prime.paxsite.com"; | |
| var client = new HttpClient(); | |
| var response = await client.GetAsync(url); | |
| if(response.IsSuccessStatusCode) | |
| { | |
| Process.Start(url); |
OlderNewer