我得到invalid_grant的错误而产生的令牌使用刷新令牌访问
POST https://login.microsoftonline.com/common/oauth2/v2.0/token
Run Code Online (Sandbox Code Playgroud)
回复
POST https://login.microsoftonline.com/common/oauth2/v2.0/token
Run Code Online (Sandbox Code Playgroud)
要求用户更改密码,密码已更改。即使在更改密码后也会看到此错误。在这种情况下刷新令牌会失效吗?
我正在尝试将现有的带有 WordPress 后端的 ReactJS 应用程序迁移到 GatsbyJS。我是 GatsbyJS 的新手,按照他们页面上的说明在 Windows 10 计算机上进行设置。设置运行得很好,我可以开始迁移过程,但一段时间后,我在尝试加载页面时只收到以下错误:
\n\nTypeError: Cannot read property 'component---src-pages-index-jsx' of undefined\n\nfetchResource\nD:/GitHub/gatsby-starter-wordpress/.cache/loader.js:77\n 74 | // Find resource\n 75 | let resourceFunction\n 76 | if (resourceName.slice(0, 12) === `component---`) {\n> 77 | resourceFunction = asyncRequires.components[resourceName]\n 78 | } else if (resourceName.slice(0, 9) === `layout---`) {\n 79 | resourceFunction = asyncRequires.layouts[resourceName]\n 80 | } else {\nView compiled\ngetResourceModule\nD:/GitHub/gatsby-starter-wordpress/.cache/loader.js:112\n 109 | cb(failedResources[resourceName])\n 110 | })\n 111 | } else {\n> 112 | fetchResource(resourceName, (err, executeChunk) => {\n …Run Code Online (Sandbox Code Playgroud) 我正在尝试编写一些代码,如果输入为空,则输入颜色变为红色。用户键入输入后,红色将被删除。
HTML
<html>
<head>
<!-- add main style -->
<link rel="stylesheet" href="../css/style.css">
<!-- add JQuery -->
<script
src="https://code.jquery.com/jquery-3.3.1.js"
integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
crossorigin="anonymous"></script>
</head>
<body>
<div class="financeContainer">
<div class="searchBox">
<input id="financeSearch" type="text" class="financeInput" placeholder="Enter The Code">
<button id="financeBtn" class="financeSearchBt"><i class="fas fa-search financeSearchIcon"></i></button>
</div>
</div>
<script>
</script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
的CSS
.redColor{
color: red;
}
Run Code Online (Sandbox Code Playgroud)
jQuery的
$(document).ready(function () {
$("#financeSearch").keydown(function () {
if ($("#financeSearch").val().length>0){
$("#financeSearch").removeClass("redColor")
}
});
$(document).bind('keypress', function(e) {
if(e.keyCode==13){
$('#financeBtn').trigger('click');
}
});
$("#financeBtn").click(function () {
var financeKey = $("#financeSearch").val();
if (financeKey == ""){ …Run Code Online (Sandbox Code Playgroud) 我有带有搜索表单的 Angular 7 应用程序。当输入表单时,我会过滤输出并将输出显示为 div 列表。当使用(单击)事件时,我可以选择并触发功能,但是当尝试使用(keydown)事件时,它不起作用。
<input type="text" class="form-control"
id="licensePlate"
aria-describedby="licensePlate"
name="licensePlate" #licensePlate="ngModel"
required minlength="2" [(ngModel)]="carModel" [ngbTypeahead]="carAutoComplete"
[inputFormatter]="CarFormatter"
[resultTemplate]="carTemplate">
Run Code Online (Sandbox Code Playgroud)
使用鼠标工作:
<ng-template #carTemplate let-r="result" let-t="term">
<div (click)="searchCar(r.id)">{{ r.licensePlate }} - {{ r.make }} {{ r.carModel }}</div>
</ng-template>
Run Code Online (Sandbox Code Playgroud)
无法使用键盘
<ng-template #carTemplate let-r="result" let-t="term">
<div (keydown)="keyDownFunction($event)" tabindex="0">{{ r.licensePlate }} - {{ r.make }} {{ r.carModel }}</div>
</ng-template>
Run Code Online (Sandbox Code Playgroud)
这是我的 TS 代码:
carAutoComplete = (text$: Observable<string>) =>
text$.pipe(
debounceTime(200),
distinctUntilChanged(),
map(term => term.length < 2 ? []
: this.carsList.filter(v => v.licensePlate.toLowerCase().indexOf(term.toLowerCase()) > -1).slice(0, 10))
) …Run Code Online (Sandbox Code Playgroud) 我是ubuntu用户。我使用以下泊坞窗图像,tensorflow/tensorflow:nightly-gpu
如果我尝试运行这个命令
$ docker run -it --rm --gpus all tensorflow/tensorflow:nightly-gpu bash
Run Code Online (Sandbox Code Playgroud)
存在权限被拒绝错误。
docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: Running hook #0:: error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: mount error: open failed: /sys/fs/cgroup/devices/user.slice/devices.allow: permission denied: unknown.
Run Code Online (Sandbox Code Playgroud)
当然,如果我正在使用 ,我可以运行此命令sudo,但我想在gpu不使用 的情况下使用sudo。
有什么好的解决办法吗?请问有什么线索吗?