小编Mik*_*mus的帖子

如何在Chrome开发工具中获取地图角度CLI css文件?

有没有办法使用源地图样式,以便Chrome Dev Tools中的编辑可以保留到添加的本地工作区?

Chrome开发者工具会在元素检查器styles.scss<style>...</style>标记中显示我的所有样式.

在此输入图像描述

在此输入图像描述

我已经设置了Chrome开发工具工作区,类似于@ vt5491在他们的SO中所做的那样:https://stackoverflow.com/a/37627935/1762493,这对.ts我认为的文件有用,但元素样式没有链接回来在元素检查中获取地图,因为它们已经使用ng服务构建了它index.html<style>元素.

  • 我在跑 ng serve -dev -p=8081
  • 并试过ng serve -dev -p=8081 --aot=true但得到了一个ENONET ng.factory.js missing error
  • 我试过把风格放在app.component.css对比中styles.scss
  • 我试图与ng build它也让所有风格融 index.html<style>

这是Angular CLI目前的方式吗?也许调整下面的网络包?它似乎是为<style>每个编译的样式表添加标签.如果这是CLI当前的工作方式,那么这可能不仅仅是一个问题,而是一个功能请求,因为我们正在进行前端工作,因此这样做可以节省时间.

相关:

感谢您提供的任何建议.

google-chrome-devtools webstorm webpack angular-cli angular

20
推荐指数
2
解决办法
5293
查看次数

您可以在 Google Colab 中隐藏代码单元格输出吗?

有没有办法在 Google Colab 中隐藏单个代码单元的输出?

pip当我们安装东西时,没有人需要看到日志的海洋:

在此处输入图片说明

如果您查看屏幕截图,您会看到我尝试应用此类似堆栈溢出问题中的解决方案之一:https : //stackoverflow.com/a/48084050/1762493

我尝试TagRemovePreprocessor.remove_single_output_tags以 a #comment、 a@@Magic和 a 的形式申请,!command但这些不适用于这条线。

我检查了 Colab 的“欢迎”和“资源”笔记本,但没有注意到更深入的笔记本设置:https : //colab.research.google.com/notebooks/welcome.ipynb

这甚至可能吗?

google-colaboratory

16
推荐指数
4
解决办法
1万
查看次数

Angular4 core.es5.js使用类装饰器时需要使用未反射的元数据填充程序

将我原先存在的项目升级到Angular 4和Angular/CLI 1.0后,我收到此错误:

core.es5.js:354 Uncaught reflect-metadata shim is required when using class decorators
Run Code Online (Sandbox Code Playgroud)

我把我的项目比作新鲜的ng new,它们在配置上看起来很相似.我重新启动了终端和计算机.删除node_modules,npm cache clean,npm prune,npm i

我在Windows 7上运行

版本1.0.0上的CLI没有错误,ng build但是当我运行应用程序时,我在浏览器中收到错误.我在https://angular-update-guide.firebaseapp.com/的帮助下从版本rc.2和Angular从v2.5升级CLI


*更新

我发现我index.scala.html没有它的脚本标签polyfills.js.挂起那部分之后我产生了这个错误:

Uncaught RangeError: Maximum call stack size exceeded
Run Code Online (Sandbox Code Playgroud)

的package.json

{
  "name": "mikeumus",
  "version": "1.0.0",
  "description": "A webpack starter for angular 2",
  "scripts": {
    "build": "ng build -dev -e dev",
    "build:aot": "ng build -prod -e prod --aot true --sourcemap false", …
Run Code Online (Sandbox Code Playgroud)

reflect-metadata angular-cli angular

10
推荐指数
2
解决办法
7141
查看次数

Node.js jsdom错误

我想让jsdom工作:)

这是代码:

var jsdom = require("jsdom");
var request = require("request");
var fs     = require('fs');
var jquery = fs.readFileSync("./jquery-1.7.2.js", 'utf-8');

request({ uri:'http://nodejs.org/dist/' }, function (error, response, body) {
    if (error && response.statusCode !== 200) {
        console.log('HTTP request error... '+error);
    }
    jsdom.env({
        html: body,
        scripts: [
            jquery
        ],
        done: function(errors, window) {
            console.log('done');
        }
    });
});
Run Code Online (Sandbox Code Playgroud)

这是错误:

jsdom.js:171
    features   = JSON.parse(JSON.stringify(window.document.implementation._fea
                                                          ^
TypeError: Cannot read property 'implementation' of undefined
Run Code Online (Sandbox Code Playgroud)

我已经检查了是否提取了页面以及是否解析了jquery lib - 它们是.

我们可以看一下jsdom.js的实现:

[snip]
exports.env = exports.jsdom.env = function() {
    [snip] …
Run Code Online (Sandbox Code Playgroud)

javascript node.js cloud9-ide jsdom contextify

7
推荐指数
2
解决办法
7526
查看次数

错误TS2300:node_modules/@types/core-js/index.d.ts中的重复标识符'PropertyKey'

我在Visual Studio Code IDE中的node_modules/@types/core-js/index.d.ts中有这些错误:

在此输入图像描述

当我运行npm start应用程序时,我得到:

    node_modules/@types/core-js/index.d.ts(21,14): error TS2300: Duplicate identifier 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(85,5): error TS2687: All declarations of 'name' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(145,5): error TS2403: Subsequent variable declarations must have the same type.  Variable '[Symbol.unscopables]' must be of type '{ copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: ...', but here has type 'any'.
node_modules/@types/core-js/index.d.ts(262,5): error TS2687: All declarations of 'flags' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(276,5): error TS2687: All declarations of 'EPSILON' must have …
Run Code Online (Sandbox Code Playgroud)

typescript tsconfig package.json angular

7
推荐指数
1
解决办法
1万
查看次数

例外:未加载运行时编译器

版本。

@ angular / cli @ 1.0.0-rc.2

复制步骤。

ng build -prod -e prod

故障给出的日志。

vendor.380a744….bundle.js:218 Error: Runtime compiler is not loaded
    at new Error (native)
    at Error.d (http://localhost:9000/portal/assets/dist/polyfills.a61f849adcea6ec74b69.bundle.js:36:1731)
    at r (http://localhost:9000/portal/assets/dist/vendor.380a74466a8bf08fbdda.bundle.js:1410:3338)
    at t.compileModuleAndAllComponentsAsync (http://localhost:9000/portal/assets/dist/vendor.380a74466a8bf08fbdda.bundle.js:1417:702)
    at e.ngOnChanges (http://localhost:9000/portal/assets/dist/main.f4b767a4fe115c7bb97e.bundle.js:1:1171229)
    at e.ngDoCheck (http://localhost:9000/portal/assets/dist/main.f4b767a4fe115c7bb97e.bundle.js:1:914180)
    at t.GGjx.t.detectChangesInternal (http://localhost:9000/portal/assets/dist/main.f4b767a4fe115c7bb97e.bundle.js:1:332790)
    at t.R2h3.t.detectChanges (http://localhost:9000/portal/assets/dist/vendor.380a74466a8bf08fbdda.bundle.js:653:5749)
    at t.Sqya.t.detectChangesInNestedViews (http://localhost:9000/portal/assets/dist/vendor.380a74466a8bf08fbdda.bundle.js:667:780)
    at t.GGjx.t.detectChangesInternal (http://localhost:9000/portal/assets/dist/main.f4b767a4fe115c7bb97e.bundle.js:1:329907)
    at t.R2h3.t.detectChanges (http://localhost:9000/portal/assets/dist/vendor.380a74466a8bf08fbdda.bundle.js:653:5749)
    at t.R2h3.t.internalDetectChanges (http://localhost:9000/portal/assets/dist/vendor.380a74466a8bf08fbdda.bundle.js:653:5542)
    at t.YSmj.t.detectChangesInternal (http://localhost:9000/portal/assets/dist/main.f4b767a4fe115c7bb97e.bundle.js:1:662563)
    at t.R2h3.t.detectChanges (http://localhost:9000/portal/assets/dist/vendor.380a74466a8bf08fbdda.bundle.js:653:5749)
    at t.Sqya.t.detectChangesInNestedViews (http://localhost:9000/portal/assets/dist/vendor.380a74466a8bf08fbdda.bundle.js:667:780)
Run Code Online (Sandbox Code Playgroud)

package.json

{
  "name": "app",
  "version": "1.0.0",
  "description": "Origianlly fomr a webpack starter for …
Run Code Online (Sandbox Code Playgroud)

angular-cli angular

7
推荐指数
2
解决办法
9112
查看次数

XCode 单元测试 - 在范围内找不到视图控制器

在我的应用程序开发的某个时刻,我的单元测试和 UI 测试无法访问我的应用程序的主模块:

在范围内找不到类型“FileVacuumViewController”

在范围内找不到类型“FileVacuumViewController”

他们之前使用过 xctestplan。我不知道它是在什么时候发生的。我尝试不导入@testable,包括tests.swift主模块的“目标成员资格”中的 。

也许我需要打开工作区而不是 xcproject?当我尝试打开工作区时,出现一条错误消息,树中没有显示任何文件: 在此处输入图片说明


这是我的 xctestplan 配置:

xctestplan 配置

当我点击单独运行一个 UI 测试时,大约有 20 个这样的代码签名对话框显示:

代码符号弹出窗口

macos xcode unit-testing nsworkspace xctestplan

7
推荐指数
2
解决办法
7148
查看次数

asciinema缺少文件:ImportError:没有名为'termios'的模块

在运行时asciinema rec,asciinema.exe都是从命令在git bash中运行C:\Python34\Scripts的唯一位置pip.

$ asciinema.exe
Traceback (most recent call last):
  File "c:\Python34\Scripts\asciinema-script.py", line 9, in <module>
    load_entry_point('asciinema==0.9.8', 'console_scripts', 'asciinema')()
  File "C:\Python34\lib\site-packages\pkg_resources.py", line 353, in load_entry
_point
    return get_distribution(dist).load_entry_point(group, name)
  File "C:\Python34\lib\site-packages\pkg_resources.py", line 2302, in load_entr
y_point
    return ep.load()
  File "C:\Python34\lib\site-packages\pkg_resources.py", line 2029, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "C:\Python34\lib\site-packages\asciinema\__main__.py", line 4, in <module
>
    from .commands.builder import get_command
  File "C:\Python34\lib\site-packages\asciinema\commands\builder.py", line 4, in
 <module>
    from .record import RecordCommand
  File "C:\Python34\lib\site-packages\asciinema\commands\record.py", …
Run Code Online (Sandbox Code Playgroud)

python pip

6
推荐指数
1
解决办法
1599
查看次数

芹菜任务没有在Django Admin中显示

在此输入图像描述

我已经尽可能地跟踪了我能找到的所有文档,甚至使用Celery的官方django示例(celery/examples/django)设置了一个示例项目,但任务仍未显示在django-admin中:


我在这里留下了对相应的django-celery github问题的评论:


我已经有3天时间试图让任务显示出来,并能够使用django-celery的admin.py中的所有令人敬畏的代码来处理调度任务等事情,但我没有运气.我正在运行相机事件deamon.不知道我错过了什么.#celery IRC中有人说django-celery正在为他们工作,所以我一定要错过一些东西.真的很兴奋让我的孤立的django-celery github项目工作,所以人们可以在使用模块时克隆它,这样他们就不会错过任务所需的小东西以使其工作.

Django版本1.7.1 Celery 3.1.18

这是我的./manage.py celery -A proj worker -l info --loglevel=DEBUG和事件相机输出的要点:


任何意见是极大的赞赏.任何人都可以通过Cloud 9访问我正在使用的ubuntu环境:https://ide.c9.io/mikeumus/celery-django-example 如果您需要写访问权限,请先在此处请求.

谢谢,迈克

django celery django-celery

5
推荐指数
0
解决办法
2362
查看次数

如何判断 javascript chrome 开发工具正在运行哪个版本?

你会说,“当然,它运行的版本与你正在运行的 Chrome 版本一致!”,但是有没有办法查看/设置你在 Chrome 中使用的 javascript 版本开发工具?

\n\n

我问这个问题是因为我试图遵循MDN 的const示例,但const在 Chrome 开发工具控制台中没有按预期工作。

\n\n

我使用的是 Chrome 版本 49.0.2623.108 m,并检查了一些实验设置。

\n\n

const我尝试在 Chrome 开发工具控制台中使用:

\n\n
const MY_FAV = 7;\nundefined\nMY_FAV\nVM202:2 Uncaught ReferenceError: MY_FAV is not defined(\xe2\x80\xa6)(anonymous function) @ VM202:2InjectedScript._evaluateOn @ VM134:878InjectedScript._evaluateAndWrap @ VM134:811InjectedScript.evaluate @ VM134:667\nMY_FAV = 20;\n20\nMY_FAV\n20\n
Run Code Online (Sandbox Code Playgroud)\n\n

今天早些时候我在控制台中编写了其他 ES6 的东西,所以...args不知道为什么const现在会这样。

\n

javascript google-chrome-devtools ecmascript-6

3
推荐指数
1
解决办法
3595
查看次数