amd

RequireJS - pass parameters into module for initialization [duplicate]

会有一股神秘感。 提交于 2019-12-04 17:01:47
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How to load bootstrapped models in Backbone.js while using AMD (require.js) I am currently creating a RESTful API for one of our projects and also wanted to provide a Javascript library to access it. Since I like the AMD principle and using require.js, I would provide an AMD module as well. The problem is: the initialization of the module would require some information like the API key on initialization. How do

How to exclude files from Dojo's Build System?

*爱你&永不变心* 提交于 2019-12-04 16:41:47
I'm following the official documentation page about the topic but I cannot configure it to ignore .txt files. I have a all.profile.js on the root of my project: var profile = (function(){ return { basePath: "./", releaseDir: "../web", action: "release", layerOptimize: "closure", optimize: "closure", cssOptimize: "comments", mini: true, stripConsole: "all", packages: [ { name: "myapp", location: "myapp" } ] }; })(); And this is the package.json inside the folder myapp : { "dojoBuild": "myapp.profile.js", "name": "my-app", "description": "This is My App", "version": "1.0", "main": "src" } And

Global context inside UMD pattern

给你一囗甜甜゛ 提交于 2019-12-04 12:57:12
I am writing an agnostic logging mechanism that works inside the browser and in nodejs (e.g. console.debug is missing in nodejs). // UMD with no dependencies (function(global, factory) { if (typeof module === 'object') { module.exports = factory(); // GLOBAL IS NOT WHAT I WOULD EXPECT, YOU? global.console = factory(); } else if (typeof define === 'function' && define.amd) { define(factory); } else { global.console = factory(); } })(this, function() { function logger() {}; return logger; }); I stumbled upon 2 differences I cannot explain: As expected, for the browser case the variable 'global'

SystemJS versioning for production and cache management (requirejs urlArgs alternative)

試著忘記壹切 提交于 2019-12-04 10:42:28
问题 I would like to migrate to SystemJS from requirejs however I am failing to find a solution as requirejs have for module versioning. For example in production (ASP.Net website) I have set RequireJS like this: require.config({ baseUrl: "@Url.Content("~/Scripts/")", urlArgs: "buildNumber=@(File.GetLastWriteTime(ViewContext.Controller.GetType().Assembly.Location).ToBinary().ToString() + typeof(Foundation.MvcApplication).Assembly.GetName().Version)", ... }); It guarantees that the file will be

Mixpanel 2.2 within an AMD structured web-app - e.g. require.js

萝らか妹 提交于 2019-12-04 09:34:41
问题 I'm attempting to make use of Mixpanel event tracking in a single page site based on Backbone.js and require.js. Looking at the snippet that Mixpanel provide for cut-and-pasting into a regular webpage, I can tell they've rolled their own async loading mechanism that pulls in the actual Mixpanel API from a standalone resource, do some extra work to setup 'people' and other attributes, and finally expose the 'mixpanel' object through the global namespace. I've tried to add shim config entries

[转帖]AMD Zen霄龙中国版:海光x86拿下加解密全球第一

末鹿安然 提交于 2019-12-04 05:24:54
AMD Zen霄龙中国版:海光x86拿下加解密全球第一 http://www.eetop.cn/cpu_soc/6946203.html 其实技术发展都是先模仿 剽窃 再自我创新的 要加以鼓励 总比 一直被人收下当狗要好的多. 2019.10 的新闻 关注国产 CPU 处理器 的肯定对海光(Hygon)有所耳闻,通过与 AMD 合作拿到了后者先进的Zen架构、代码IP的授权(Dhyana),二次开发了属于自己的海光C86 处理器 ,基本就是 AMD 一代霄龙的翻版,GF 14nm工艺制造,最多32核心64线程。 很多人对于国内 芯片 团队能否消化吸收如此先进的x86架构感到担心,也忧虑其中是否会有“后门”的存在,毕竟x86 CPU 里往往都会有“冗余”模块,斯诺登也证实了一些不可告人的秘密。 现在,好消息来了! SiSoftware Sandra 测试 数据库中,赫然出现了海光C86 7185旗舰型号,32核心64线程,主频2.0GHz(应该是基准频率),集成16MB二级缓存、64MB三级缓存,来自一台曙光机架式服务器。 在加解密 测试 项目中,这颗海光C86赫然拿下了全球第一名,加密、解密、哈希带宽均达到了101GB/s,非常恐怖的数字。 更关键的是,据称海光C86 处理器 中唯一不是来自 AMD 原始设计、中国方面原创加入的恰恰就是加解密部分。在信息安全越来越核心的当下

Do x86 Android AVD's work on Linux on AMD?

杀马特。学长 韩版系。学妹 提交于 2019-12-04 01:58:11
问题 I know that you cannot run the x86 images on Windows on AMD. I am trying to see if I can run them on Linux though as the documentation implies. I installed Ubuntu 1704. I installed the latest Android Studio 2.3.3. I created a default AVD for API 25 on x86. I have also installed the following packages: cpu-checker lib32ncurses5 lib32z1 gcc-multilib nvidia-current I have an AMD Phenom II 1045T: vendor_id : AuthenticAMD cpu family : 16 model : 10 model name : AMD Phenom(tm) II X6 1045T Processor

None of the Genymotion Emulator are showing up under connected devices in Android Studio

假装没事ソ 提交于 2019-12-03 22:33:04
I have successfully installed Android Studio, it works really great thus far. I have also downloaded Genymotion which came with virtual box, that works really great thus far as well. In Genymotion , I added the file path from Android Studio Tools which I copied and paste from SDK Manager. In Android Studio, as well, I added the path ( I believe the Default file path it is): C:\Program File\GenyMobile\Genymotion I then started the device in Genymotion of my choice , the emulator showed up (This worked out great !) Then I went to Android Studio (while the device in Genymotion status states