amd

using amd modules with typescript

我的未来我决定 提交于 2021-01-29 04:27:40
问题 I am working on an Durandal spa and would like to write new code in typescript. Is there a way to mix amd modules with typescript classes? This an example of an amd module. I removed some code from the module to make it more readable. define(['durandal/app', 'durandal/system', 'config', 'amplify'], function (app, system, config, amplify) { var exports = {}; var init = function () { ... }; var onRequestError = function(response, status) { ... }; exports.getTablePresentation = function (lemmaId

using amd modules with typescript

假如想象 提交于 2021-01-29 04:21:41
问题 I am working on an Durandal spa and would like to write new code in typescript. Is there a way to mix amd modules with typescript classes? This an example of an amd module. I removed some code from the module to make it more readable. define(['durandal/app', 'durandal/system', 'config', 'amplify'], function (app, system, config, amplify) { var exports = {}; var init = function () { ... }; var onRequestError = function(response, status) { ... }; exports.getTablePresentation = function (lemmaId

Replace dropped frame

百般思念 提交于 2020-12-14 13:14:22
问题 I'm doing a Cloud Gaming solution that works kind of "good". At the moment our servers runs a game, encode the video using VCE (AMD hardware encoding), chunk the video frames and send it in UDP to the player. The player receives the packets, rebuid the data and decode it. So we have no problems if there is no packet loss. In the case of a wired connexion everything is smooth, but people like to use Wifi (5ghz, we can't handle 2Ghz). Even if you have a good Wifi, you may experience packet loss

Replace dropped frame

六眼飞鱼酱① 提交于 2020-12-14 13:14:21
问题 I'm doing a Cloud Gaming solution that works kind of "good". At the moment our servers runs a game, encode the video using VCE (AMD hardware encoding), chunk the video frames and send it in UDP to the player. The player receives the packets, rebuid the data and decode it. So we have no problems if there is no packet loss. In the case of a wired connexion everything is smooth, but people like to use Wifi (5ghz, we can't handle 2Ghz). Even if you have a good Wifi, you may experience packet loss

“Modules that use an anonymous define() call must be loaded with a require() call”

萝らか妹 提交于 2020-12-10 08:35:31
问题 In the walkthrough step 7: JSON Model example, the app apparently works as documented but I see the following error in the console: Error: Modules that use an anonymous define() call must be loaded with a require() call; they must not be executed via script tag or nested into other modules. The only other instance of this message that I could find seems, to my untrained eye, to deal with a wholly different scenario. I've tried both Firefox and Chromium, CDN hosting vs local hosting, two

Angular 10 - CommonJS or AMD dependencies can cause optimization bailouts

孤人 提交于 2020-08-26 10:00:08
问题 I've updated from angular 7.1.4 to 10. Now i receive strange warnings like this one: WARNING in C:\Sviluppo\Welcome\welcome-cloud-app\src\app\calendario-fasce\mese\mese.component.ts depends on src/app/interfaces/calendar/calendar.component. CommonJS or AMD dependencies can cause optimization bailouts. For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies For other warnings like this, i've added in angular.json the relative line, for example:

AMD APU A10-5800K, Debian Wheezy, 系统安装ATI闭源驱动

大兔子大兔子 提交于 2020-04-12 17:59:26
AMD APU A10-5800K, Debian Wheezy, 系统安装ATI闭源驱动 http://my.oschina.net/emptytimespace/blog/87464 AMD APU A10-5800K 集成显卡是: AMD Radeon HD 7660D,请不是此类显卡者小心跟随。 我们此处重点讨论在新立得中安装AMD ATI 的闭源催化剂驱动,主要是考虑到源中的驱动可以实时更新。 如果想使用最新的驱动并且能够接受将来变旧,可就可能需要继续手动安装,那么可以到官网下载最新驱动,这在本文最后再提到。 【方法一:(个人推荐)】 1)因为是闭源的,首先需要开启nofree的软件源 2)新力得中搜索安装所有 fglrx*(之前似乎需要安装build-essential) 3)# aticonfig --initial (有的使用:aticonfig --initial -f ,意为force,本人认为能不强制就不强制) 4)# depmod -a 生成 modules.dep 和 map 文件 ,似乎和模块加载顺序有关。 depmod will output a dependency list suitable for the modprobe utility 5)# reboot 安装完成,很简单吧,之后可以重启多次,因为我的似乎换不同内核启动过几次

How to integrate ES6 Module syntax in RequireJS project

允我心安 提交于 2020-04-11 02:07:13
问题 I'm looking for a way to use ES6 Modules (import/export) syntax in my current RequireJS project. I can run my project directly in a recent browser, without build or Babel transformation. I build my project with r.js and Babel only for production. We would like to start building ES6 modules and use it with requireJS. Is there a way to do that ? NB : RequireJS does not load dependencies written in ES6. 回答1: Yes, RequireJS should be compatible with Babel's es2015-modules-umd plugin. So you

How to integrate ES6 Module syntax in RequireJS project

故事扮演 提交于 2020-04-11 02:06:50
问题 I'm looking for a way to use ES6 Modules (import/export) syntax in my current RequireJS project. I can run my project directly in a recent browser, without build or Babel transformation. I build my project with r.js and Babel only for production. We would like to start building ES6 modules and use it with requireJS. Is there a way to do that ? NB : RequireJS does not load dependencies written in ES6. 回答1: Yes, RequireJS should be compatible with Babel's es2015-modules-umd plugin. So you

AMD 和 CMD 的区别

[亡魂溺海] 提交于 2020-03-31 16:32:39
AMD 规范在这里: https://github.com/amdjs/amdjs-api/wiki/AMD CMD 规范在这里: https://github.com/seajs/seajs/issues/242 AMD 是 RequireJS 在推广过程中对模块定义的规范化产出。 CMD 是 SeaJS 在推广过程中对模块定义的规范化产出。 类似的还有 CommonJS Modules/2.0 规范,是 BravoJS 在推广过程中对模块定义的规范化产出。还有不少⋯⋯ 这些规范的目的都是为了 JavaScript 的模块化开发,特别是在浏览器端的。目前这些规范的实现都能达成 浏览器端模块化开发的目的 。 区别: 1. 对于依赖的模块,AMD 是 提前执行 ,CMD 是 延迟执行 。不过 RequireJS 从 2.0 开始,也改成可以延迟执行(根据写法不同,处理方式不同)。CMD 推崇 as lazy as possible. 2. CMD 推崇 依赖就近 ,AMD 推崇 依赖前置 。看代码: // CMD define(function(require, exports, module) { var a = require('./a') a.doSomething() // 此处略去 100 行 var b = require('./b') // 依赖可以就近书写 b