小编Noa*_*rec的帖子

反应开发工具 - 停用“警告中断”

在使用 create-react-app 进行开发时,我的浏览器在出现警告时进入调试器模式:

在调试器中暂停

它打破了 react-dev-tools 的源代码:

   // --- Welcome to debugging with React DevTools ---
   // This debugger statement means that you've enabled the "break on warnings" feature.
   // Use the browser's Call Stack panel to step out of this override function-
   // to where the original warning or error was logged.
Run Code Online (Sandbox Code Playgroud)

如何停用此行为?

javascript-debugger reactjs

88
推荐指数
3
解决办法
8983
查看次数

Angular - 工作区中未设置配置

我尝试使用我的特定配置为我的 Angular 应用程序提供服务,但 Angular 无法识别它:

$ ng serve --configuration=fr
An unhandled exception occurred: Configuration 'fr' is not set in the workspace.
See "/tmp/ng-nyZPjp/angular-errors.log" for further details.
Run Code Online (Sandbox Code Playgroud)

我的 angular.json :

"configurations": {
  "fr": {
    "aot": true,
    "outputPath": "dist/fr/",
    "i18nFile": "src/i18n/messages.fr.xlf",
    "i18nFormat": "xlf",
    "i18nLocale": "fr",
    "i18nMissingTranslation": "error",
    "baseHref": "/fr/"
  },
  "en": { 
    "aot": true,
    "outputPath": "dist/en/",
    "i18nFile": "src/i18n/messages.en.xlf",
    "i18nFormat": "xlf",
    "i18nLocale": "en",
    "i18nMissingTranslation": "error",
    "baseHref": "/en/"
  },
    ...
Run Code Online (Sandbox Code Playgroud)

ng serve --configuration=en 完美运行

angular-cli angular

43
推荐指数
3
解决办法
2万
查看次数

在 Scala 中使用 testcontainers 指定容器名称

使用 dimafeng 的Scala 测试容器,我可以从同一个镜像创建多个容器:

class TestWithTwoDatabases extends FunSuite with ForEachTestContainer  {
  protected val inputContainer: PostgreSQLContainer = PostgreSQLContainer("postgres:13.3")
  protected val outputContainer: PostgreSQLContainer = PostgreSQLContainer("postgres:13.3")
  override val container: MultipleContainers = MultipleContainers(inputContainer, outputContainer)

  // Some integration tests
}
Run Code Online (Sandbox Code Playgroud)

如何在docker控制台中区分它们?我目前有:

CONTAINER ID   IMAGE          NAMES
a2bee9488c02   postgres:13.3  youthful_archimedes # I'd like to have inputContainer here
2c645ed1c54c   postgres:13.3  agitated_cori       # I'd like to have outputContainer here
Run Code Online (Sandbox Code Playgroud)

在 Scala 中创建容器时如何指定容器的名称?

scala testcontainers

0
推荐指数
1
解决办法
584
查看次数