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
| export class ProxyWrapperBase { | |
| constructor() { | |
| } | |
| onChange(target: Object, key: PropertyKey, newValue: any, oldValue: any){ | |
| } | |
| } |
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
| export class BinaryMessage { | |
| Buffer: ArrayBuffer; | |
| private header: Uint8Array | |
| GetMessage(buffer: ArrayBuffer): any { | |
| let headerLen = 8; | |
| let header = new Uint8Array(buffer, 0, headerLen); | |
| let payloadLength = ThorIO.Client.Utils.arrayToLong(header); |
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
| import { | |
| ThorIO,CanInvoke,ControllerProperties,CanSet | |
| } from "thor-io.vnext" | |
| // simple model | |
| class ChatMessage | |
| { | |
| text:string; | |
| } |
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
| // location controllers/controller.js | |
| // this will store the messages and act as a fake db .-) | |
| var fakeDb = { | |
| messages : [] | |
| }; | |
| var ChatController = (function (db) { | |
| // find out who this message targets? |
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
| MyControllers.PeerController =(function () { | |
| var randomString = function () { | |
| return Math.random().toString(36).substring(7); | |
| }; | |
| var chatMessage = function (text,nickname) { | |
| this.text = text; | |
| this.created = new Date(); | |
| }; |
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
| // Skapa vår app | |
| angular.module("jonas.app", []); | |
| // the controller | |
| (function (angular) { | |
| var myController = function($scope,myService) { |
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 IEnumerable<FakeOrder> CallServiceToFind(string query) | |
| { | |
| System.Threading.Thread.Sleep(1000); | |
| return orders.Where(p => p.ProjectName.ToLower().Contains(query.ToLower())).Take(400); | |
| } | |
| private Task<IEnumerable<FakeOrder>> _task { get; set; } | |
| public async Task FindOrder(string query,int chunks = 10,int wait = 1000) | |
| { | |
| try | |
| { |
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.Threading; | |
| using System.Threading.Tasks; | |
| using System.Web; | |
| using XSockets.Core.Common.Socket; | |
| using XSockets.Core.Common.Utility.Logging; | |
| using XSockets.Core.XSocket.Helpers; | |
| using XSockets.Plugin.Framework; |
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 Watchers = { | |
| getWatchers : function(root) { | |
| root = angular.element(root || document.documentElement); | |
| function getElemWatchers(element) { | |
| var isolateWatchers = getWatchersFromScope(element.data().$isolateScope); | |
| var scopeWatchers = getWatchersFromScope(element.data().$scope); | |
| var watchers = scopeWatchers.concat(isolateWatchers); | |
| angular.forEach(element.children(), function (childElement) { | |
| watchers = watchers.concat(getElemWatchers(angular.element(childElement))); | |
| }); |
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
| $scope.myArray = []; | |
| for (var i = 1; i < 200;i++) { | |
| $scope.myArray.push({ | |
| id: i, | |
| firstName: (Math.random() * 9e6).toString(36), | |
| lastName: (Math.random() * 9e6).toString(36), | |
| city: (Math.random() * 9e6).toString(36), | |
| zipcode: i * 100, |