小编tak*_*hin的帖子

子类化异常

我们都同意,为不同的任务使用不同的异常类型是要走的路.

但是,我们最终创建了像这样的ghost文件:

/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy …
Run Code Online (Sandbox Code Playgroud)

php error-handling zend-framework exception-handling exception

2
推荐指数
1
解决办法
904
查看次数

清除postgresql数据库,因为它是新的

我使用创建了PostgreSQL数据库转储psql.

现在我想从文件中恢复此备份:

psql -d thesamename -f /my/backup/file
Run Code Online (Sandbox Code Playgroud)

但是我得到数据已经存在的错误.

是否有任何命令从数据库中删除所有内容以使其处于刚刚创建状态,除了再次删除和创建?
(我不想再次设置所有者,tablescpace等)

也许某种方法用备份文件中的那个覆盖数据库?(备份文件来自另一个数据库服务器)

sql database postgresql scripting

2
推荐指数
1
解决办法
6122
查看次数

在功能模块中延迟加载 Angular Material

目前我有MyAngularModule类似的:

/app/material/material.module.ts

import { MatButtonModule, MatIconModule } from '@angular/material';

const MaterialComponents = [
  MatButtonModule,
  MatIconModule,
...
];

@NgModule({
  imports: [
    MaterialComponents
  ],
  exports: [
    MaterialComponents
  ],
})
export class MyMaterialModule {

}
Run Code Online (Sandbox Code Playgroud)

现在导入一次AppModule

目前我有一个“扁平”模块架构,全部都急切地加载。

现在我正在更改应用程序架构以具有核心、共享和功能模块(使用延迟加载loadChildren)。

例如。

/features/data-grid/data-grid.module.ts
Run Code Online (Sandbox Code Playgroud)

该模块将使用一些 Angular Material 组件(例如 SpinnerModule),但不是全部。

其他功能模块将使用其他一些 Material 组件。
某些组件显然会在许多功能模块中使用。

问题是:如何在功能模块中加载所需的材质组件?应该MyMaterialModule是模块的子模块吗shared

architecture lazy-loading angular-module angular-material2 angular

2
推荐指数
1
解决办法
1820
查看次数

Netbeans 调试器会话:在同一选项卡中打开

在 Netbeans 中运行 PHP 调试会话总是在浏览器中作为新选项卡打开(我使用 Chrome 和 Firefox)。

如何强制浏览器(或 Netbeans)在同一个浏览器选项卡中运行会话,所以我没有 n 个具有相同 url 的打开选项卡进行调试?

php debugging firefox netbeans google-chrome

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