ERROR in Type NumberInputDirective in D:/ProjectX/src/app/common/number-input.directive.ts is part of the declarations of 2 modules: blablaA and blablaB Please consider moving NumberInputDirective to a higher module that imports blablaA and blablaB. You can also create a new NgModule import that NgModule in blablaA and blablaB
2026-07 修订:这是现代 Electron 中的正常安全结果。渲染进程默认不应该直接 require Node.js 模块;需要主进程能力时,通过 preload 暴露最小 API。
1 2 3 4 5 6 7 8 9 10 11
// Create the browser window. win = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: false, // is default value after Electron v5 contextIsolation: true, // protect against prototype pollution sandbox: true, // default after Electron v20 for renderers without Node integration preload: path.join(__dirname, "preload.js") } });
2026-07 新增:安全基线
不加载不可信远程代码;如果必须加载远程内容,禁用 Node.js 集成并限制导航。
保持 contextIsolation: true,使用 contextBridge 暴露窄接口。
保持 webSecurity 默认开启,配置 CSP。
对 shell.openExternal 的 URL 做协议和域名白名单校验。
定期升级 Electron,因为应用实际携带 Chromium、Node.js 和 Electron 本体。
shell.openExternal
Open the given external protocol URL in the desktop’s default manner. 对于系统支持的协议,以系统默认行为打开URL
windows 开始 搜索“按协议指定默认应用程序”或“Choose default apps by protocol”
const canvas = document.getElementById('webgl'); // if webgl context isnot exist, init it const webgl = canvas.getContext('webgl');
// Set clear color to black, fully opaque webgl.clearColor(0.0, 0.0, 0.0, 1.0); // Clear the color buffer with specified clear color webgl.clear(webgl.COLOR_BUFFER_BIT);
If commandA succeeds run commandB, if it fails commandC
In most cases the Exit Code is the same as the ErrorLevel
刷新应用图标
桌面图标显示为未知文件,调用以下应用可以解决
run ie4uinit -show
Fix The Parameter is Incorrect Exception
某年月日因磁盘松动,重新连接后报如图异常
命令行执行
1
chkdsk /f
检索到了网络上的解决方法chkdsk /f /x /r,后面的参数会极大增加修复错误花的时间,而且/x /r 都包含了/f (fixes errors on the disk. The disk must be locked. If chkdsk cannot lock the drive, a message appears that asks you if you want to check the drive the next time you restart the computer.)
Perl, Perl 是 Practical Extraction and Report Language 的缩写,可翻译为 “实用报表提取语言”。if you want to build OpenSSL® and nginx with SSL support. For example ActivePerl or Strawberry Perl.
WebGL 是一种 3D 绘图标准,这种绘图技术标准允许把 JavaScript 和 OpenGL ES 2.0 结合在一起,通过增加 OpenGL ES 2.0 的一个 JavaScript 绑定,WebGL 可以为 HTML5 Canvas 提供硬件 3D 加速渲染,这样 Web 开发人员就可以借助系统显卡来在浏览器里更流畅地展示3D场景和模型了
WebGL 的出现使得在浏览器上面实时显示 3D 图像成为,WebGL 本质上是基于光栅化的 API ,而不是基于 3D 的 API。