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 faker from 'faker' | |
| import puppeteer from 'puppeteer' | |
| const appUrlBase = 'http://localhost:4000' | |
| const routes = { | |
| public: { | |
| register: `${appUrlBase}/register`, | |
| login: `${appUrlBase}/login`, | |
| noMatch: `${appUrlBase}/asdf`, | |
| }, |
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
| CULTURE SPEC.CULTURE ENGLISH NAME | |
| -------------------------------------------------------------- | |
| Invariant Language (Invariant Country) | |
| af af-ZA Afrikaans | |
| af-ZA af-ZA Afrikaans (South Africa) | |
| ar ar-SA Arabic | |
| ar-AE ar-AE Arabic (U.A.E.) | |
| ar-BH ar-BH Arabic (Bahrain) | |
| ar-DZ ar-DZ Arabic (Algeria) | |
| ar-EG ar-EG Arabic (Egypt) |
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
| app.component('testcpn', { | |
| templateUrl: 'template/page/advance-option.html', | |
| controller: function ($http,$scope) { | |
| var vm = this; | |
| // put all code of controller inside of require and we can use all service defined by requireJs | |
| require(['cmp-basic', 'cmp-form', 'cmp-headresult', 'service-service', 'service-gateway', 'pageManager', 'comparator', 'messagebox'], function (cmpBasic, cmpForm, cmpHeadresult, srvService, srvGateway, pageManager, comparator, messagebox) { | |
| console.log(pageManager); | |
| vm.date = new Date(); | |
| vm.applyClick = function (){ |
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
| 1. Build GraphQL server using `express-graphql` package. | |
| 2. Configure `schema.js` file. | |
| 3. Query for data. |
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 RTMessage { | |
| /// <summary> | |
| /// This field used to set type of message transfered. It can be | |
| /// 0: Stock list changes | |
| /// 1: Sector changes | |
| /// </summary> | |
| public string MsType { get; set; } | |
| /// <summary> |
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 SignalRSender | |
| { | |
| IHubContext Context = GlobalHost.ConnectionManager.GetHubContext<MyHub>(); | |
| public void BroadcastMessage(RTMessage message) | |
| { | |
| Context.Clients.All.Invoke("receiveMessage", message.ToJson()); | |
| } | |
| } |
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 MyHub: Hub | |
| { | |
| public RTMessage RequestData(RTCRequest requestMessage) | |
| { | |
| try | |
| { | |
| return SignalRRequestHandler.Instance.HandleRequest(requestMessage, Context.ConnectionId); | |
| } | |
| catch (Exception ex) | |
| { |
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 AppStartup { | |
| public void Configuration(IAppBuilder app){ | |
| app.UseCors(CorsOptions.AllowAll); | |
| app.MapSignalR(); | |
| } | |
| } |
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 SignalRWebApp | |
| { | |
| public static void Start(string[] args) | |
| { | |
| string signalRServer = "http://localhost:8080"; | |
| // Make long polling connections wait a maximum of 110 seconds for a | |
| // response. When that time expires, trigger a timeout command and | |
| // make the client reconnect. | |
| GlobalHost.Configuration.ConnectionTimeout = TimeSpan.FromSeconds(60)); |