我在Windows 10 PC上使用Visual Studio Code.我想将我的默认终端从Windows PowerShell更改为Ubuntu上的Bash(在Windows上).
我怎样才能做到这一点?
我正在尝试将panelClass配置添加到Angular Material Snackbar.
我通过以下官方网站的文档编写了以下代码.
import { Component, OnInit } from '@angular/core';
import { MatSnackBar, MatSnackBarConfig } from "@angular/material";
import { Location } from '@angular/common';
@Component({
selector: 'snack-bar-component-example',
templateUrl: './snack-bar-component-example.html',
styleUrls: ['./snack-bar-component-example.css']
})
export class SnackBarComponentExample implements OnInit {
constructor(public snackBar: MatSnackBar) { }
ngOnInit() {
}
saveButtonClick = () =>{
this.snackBar.open("This is a message!", "ACTION", {
duration: 3000,
panelClass: ["font-family:'Open Sans', sans-serif;"]
});
}
}
Run Code Online (Sandbox Code Playgroud)
我已经将事件绑定到HTML按钮.当我删除panelClass配置时,持续时间配置工作正常.我正在导入Google字体(Open Sans)并尝试将字体应用于Snackbar.但是,我收到一个错误:
ERROR DOMException: Failed to execute 'add' on …Run Code Online (Sandbox Code Playgroud) 我正在尝试构建一个具有关闭、最大化和最小化按钮的简单应用程序。
应用程序的问题是关闭、最大化和最小化无法正常工作。该console.log()被点击的按钮后,正常运行并显示正确的信息,但是,它没有执行实际的关闭,最大化和最小化操作。
另外,不是在 CSS 中,我添加-webkit-app-region: drag;了标题,但添加-webkit-app-region: no-drag;了选项,即按钮。
附上截图。
驱动 index.js 的内容是:
const {app, BrowserWindow} = require('electron');
const url = require('url');
let win = null;
function boot() {
win = new BrowserWindow({
width: 640,
height: 480,
frame: false
});
win.loadURL(`file://${__dirname}/index.html`);
win.on('closed', () => {
win = null;
});
}
app.on('ready', boot);Run Code Online (Sandbox Code Playgroud)
header {
display: flex;
flex-direction: row-reverse;
justify-content: flex-start;
background: #353535;
color: black;
align-self: stretch;
-webkit-app-region: drag;
}
#content {
display: flex;
height: 100vh;
flex-direction: …Run Code Online (Sandbox Code Playgroud)我正在尝试使用Probot Framework构建GitHub应用程序。
这是file的内容index.js:
module.exports = (robot) => {
robot.log('Yay, the app was loaded!');
robot.on('*', async context => {
robot.log('Some event occured!');
});
}
Run Code Online (Sandbox Code Playgroud)
但是,当我运行此应用程序时,将其安装在存储库中后,我收到此错误:
03:38:34.831Z ERROR probot: signature does not match event payload and secret
Error: signature does not match event payload and secret
at verifyAndReceive (/mnt/e/GSoC/test/test/node_modules/@octokit/webhooks/middleware/verify-and-receive.js:9:19)
at IncomingMessage.request.on (/mnt/e/GSoC/test/test/node_modules/@octokit/webhooks/middleware/middleware.js:53:5)
at emitNone (events.js:106:13)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)
Run Code Online (Sandbox Code Playgroud)
这个错误背后的问题是什么?我该如何解决这个问题?
我写了一个简单的代码:
#include <iostream>
using namespace std;
int main()
{
int a, b;
while (cin >> a >> b) //Note the cin inside while loop
{
cout << a << b << "\n";
}
}
Run Code Online (Sandbox Code Playgroud)
我们知道while循环仅在表达式计算true( 1) 或false( 0)时起作用。怎么cin评价true和false。
还有如何当我输入号码后停止,当我输入一些非数字的同时循环中运行?它是如何评价真假的?
angular ×1
bash ×1
c++ ×1
cin ×1
cmd ×1
electron ×1
github ×1
github-api ×1
javascript ×1
powershell ×1
probot ×1
terminal ×1
typescript ×1
while-loop ×1