本文的目的是介绍语义错误:不支持的计算列名GET/dbs/*/colls/*/pkrangesKusto的详细情况,特别关注不支持或定义代码语言的相关信息。我们将通过专业的研究、有关数据的分析等多种方
本文的目的是介绍语义错误:不支持的计算列名 GET /dbs/*/colls/*/pkranges Kusto的详细情况,特别关注不支持或定义代码语言的相关信息。我们将通过专业的研究、有关数据的分析等多种方式,为您呈现一个全面的了解语义错误:不支持的计算列名 GET /dbs/*/colls/*/pkranges Kusto的机会,同时也不会遗漏关于Android Studio错误:不支持的Android Gradle插件版本(0.9.2)、android – Gradle kotlin不支持的方法Dependencies.getAtoms()、angular – 自定义错误处理程序抛出错误:无法读取未定义的属性“get”(Injector)、angularjs – localStorage vs sessionStorage和cookie的知识。
本文目录一览:- 语义错误:不支持的计算列名 GET /dbs/*/colls/*/pkranges Kusto(不支持或定义代码语言)
- Android Studio错误:不支持的Android Gradle插件版本(0.9.2)
- android – Gradle kotlin不支持的方法Dependencies.getAtoms()
- angular – 自定义错误处理程序抛出错误:无法读取未定义的属性“get”(Injector)
- angularjs – localStorage vs sessionStorage和cookie
语义错误:不支持的计算列名 GET /dbs/*/colls/*/pkranges Kusto(不支持或定义代码语言)
如何解决语义错误:不支持的计算列名 GET /dbs/*/colls/*/pkranges Kusto?
我的 kusto 查询中有计算列。现在列名之一是“GET /dbs//colls//pkranges”。在运行我的查询时,我遇到了这个错误
Semantic error: Unsupported calculated column name GET /dbs/*/colls/*/pkranges Kusto
有人可以帮助动态替换列名还是在计算本身时? 我的查询如下
dependencies
| where operation_Id in (operation_ids)
| where timestamp > ago(7d)
| summarize duration_list=make_list_with_nulls(duration) by tostring(name),operation_Id
| extend p = pack(tostring(name),duration_list)
| summarize bag = make_bag(p) by operation_Id
| evaluate bag_unpack(bag);
提前致谢!!
解决方法
您可以使用其他内容替换键中的无效字符(在本例中为 *
),如下所示,使用 replace_string()
:
dependencies
| where operation_Id in (operation_ids)
| where timestamp > ago(7d)
| summarize duration_list=make_list_with_nulls(duration) by tostring(name),operation_Id
| extend p = pack(replace_string(name,''*'',''_''),duration_list)
| summarize bag = make_bag(p) by operation_Id
| evaluate bag_unpack(bag);
Android Studio错误:不支持的Android Gradle插件版本(0.9.2)
The project is using an unsupported version of the Android Gradle plug-in (0.9.2) Consult IDE log for more details (Help | Show Log)
我不太了解Gradle,Ant,Maven或任何构建的脚本.此外,没有选项可以从android studio的“开始”屏幕查看日志.
解决方法
buildscript { ... dependencies { classpath 'com.android.tools.build:gradle:0.12.+' } }
保存文件并尝试重新打开您的项目.
android – Gradle kotlin不支持的方法Dependencies.getAtoms()
Error:Unsupported method: Dependencies.getAtoms(). The version of Gradle you connect to does not support that method. To resolve the problem you can change/upgrade the target version of Gradle you connect to. Alternatively,you can ignore this exception and read other information from the model.
任何人都知道这意味着什么以及如何解决它?
可能只需要改变某些东西的版本.
gradle包装:
#Mon Jun 19 08:02:32 BST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip
项目gradle
buildscript { ext.kotlin_version = '1.1.2-5' repositories { maven { url 'https://maven.google.com' } jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.0.0-alpha4' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { maven { url 'https://maven.google.com' } jcenter() mavenCentral() } } task clean(type: Delete) { delete rootProject.buildDir }
app gradle
apply plugin: 'com.android.application' apply plugin: 'kotlin-android' android { compileSdkVersion 25 buildToolsversion "25.0.3" defaultConfig { applicationId "uk.me.mungorae.aircraft.aircraft" minSdkVersion 21 targetSdkVersion 25 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro' } } } dependencies { implementation filetree(dir: 'libs',include: ['*.jar']) androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2',{ exclude group: 'com.android.support',module: 'support-annotations' }) implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" implementation 'com.android.support:appcompat-v7:25.4.0' testImplementation 'junit:junit:4.12' implementation 'com.android.support.constraint:constraint-layout:1.0.2' }
解决方法
您可以在以下位置下载:
https://developer.android.com/studio/preview/index.html
angular – 自定义错误处理程序抛出错误:无法读取未定义的属性“get”(Injector)
创建一个基类(app-error.ts)和其他类(例如处理403错误创建类access-denied.ts),这些类扩展了这个基类.
在基类中注入了一个服务toastrService,我想显示来自子类的自定义消息但是它给出了错误
无法读取未定义的属性’get’
这个问题与OOPS概念有关.我不明白如何获取覆盖父方法或使用我的自定义参数调用.
TS v 2.3.3
角度v 4.3.4
app.module.ts
providers: [ { provide: ErrorHandler,useClass: AppErrorHandler } ]
注意:AppErrorHandler类与AppError完全不同,AppError扩展了处理系统错误的角度ErorHandler接口.
错误拦截
import { Router } from '@angular/router'; import { Injectable,Injector } from '@angular/core'; import { HttpInterceptor,HttpResponse,HttpRequest,HttpHandler,HttpEvent,HttpErrorResponse } from '@angular/common/http'; import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/do'; import { AuthFail,BadInput,NotFoundError,ServerError,AppError,AccessDenied,} from '../shared/errors'; import { AuthenticationService } from './../authentication/authentication.service'; @Injectable() export class ErrorInterceptor implements HttpInterceptor { private auth: AuthenticationService; constructor(private router: Router,private injector: Injector) { } intercept(req: HttpRequest<any>,next: HttpHandler): Observable<HttpEvent<any>> { const auth = this.injector.get(AuthenticationService); return next.handle(req).catch((err: HttpErrorResponse) => { if (err instanceof HttpErrorResponse) { if (err.status === 401) { return Observable.throw(new AuthFail(err.error)); } if (err.status === 400) { return Observable.throw(new BadInput(err.error)); } if (err.status === 404) { return Observable.throw(new NotFoundError()); } if (err.status === 403) { return Observable.throw(new AccessDenied()); } return Observable.throw(new AppError(err)); } }); } }
访问denied.ts
import { AppError } from './app-error'; export class AccessDenied extends AppError { constructor(public originalError?: any) { super(); console.log('inside acces denied constructor'); // super.handleError("superrrrr"); // this also doesn't work } public handleError(): void { console.log('handleError: ',); super.handleError("Access denined error occured"); } }
APP-error.ts
import { Inject,Injector } from "@angular/core"; import { ToastrService } from "ngx-toastr"; export class AppError { toastrService: ToastrService; constructor(public originalError?: any,private injector?: Injector) { this.toastrService = this.injector.get(ToastrService); } // NOTE: using getter seems impossible to access in child so add the same in constructor // get toastrService(): ToastrService { // return this.injector.get(ToastrService); // } public handleError(msg: string): void { this.toastrService.error(`Error Message: ${msg}`,"Error",{ closeButton: true,timeOut: 5000,onActivateTick: true } ); } }
给出错误
core.es5.js:1020 ERROR TypeError: Cannot read property 'get' of undefined at AccessDenied.AppError (app-error.ts:8) at new AccessDenied (access-denied.ts:6) at CatchSubscriber.eval [as selector] (error.interceptor.ts:61) at CatchSubscriber.error (catchError.js:105) at XMLHttpRequest.onLoad (http.es5.js:1739) at ZoneDelegate.invokeTask (zone.js:421) at Object.onInvokeTask (core.es5.js:3881) at ZoneDelegate.invokeTask (zone.js:420) at Zone.runTask (zone.js:188) at ZoneTask.invokeTask [as invoke] (zone.js:496)
解决方法
可以通过强制参数来修复它:
constructor(private injector: Injector,public originalError?: any) { this.toastrService = this.injector.get(ToastrService); }
AccessDenied中可以省略构造函数.并且应该像新的AccessDenied(注入器)一样进行实例化.
这里真正的问题是AppError完成了它不应该做的工作.考虑到它只是包含以后可以使用错误的appof instanceof确定的错误,它不应该执行当前在handleError中完成的副作用.
handleError中的逻辑可以移动到ToastrService中的方法,或者单独接受AppError实例的错误服务.如果需要为错误类型提供默认消息,例如发生访问被拒绝错误,则AppError可以具有包含该消息的公共属性.
angularjs – localStorage vs sessionStorage和cookie
localStorage,sessionStorage,cookies ???
我问我可以使用什么来保持DOM中的一些数据,即使用户刷新页面,有人说:使用sessionStorage或localStorage,然后,有人想出了使用ngCookies的想法,因为它的工作原理每个浏览器,但是,我应该使用?
localStorage存储信息,只要用户不删除它们。
sessionStorage存储信息只要会话结束。通常直到用户关闭标签页/浏览器。
cookie只是简单的cookie,由旧的浏览器支持,通常是使用上述WebStorages的框架的后备。
相比之下,Cookie可以存储较少的信息,然后WebStorage和WebStorages中的信息不会传输到服务器。
请注意,欧盟有一项法规,要求网站向用户通知Cookie的使用情况。我不知道这是否也适用于WebStorages
关于语义错误:不支持的计算列名 GET /dbs/*/colls/*/pkranges Kusto和不支持或定义代码语言的介绍现已完结,谢谢您的耐心阅读,如果想了解更多关于Android Studio错误:不支持的Android Gradle插件版本(0.9.2)、android – Gradle kotlin不支持的方法Dependencies.getAtoms()、angular – 自定义错误处理程序抛出错误:无法读取未定义的属性“get”(Injector)、angularjs – localStorage vs sessionStorage和cookie的相关知识,请在本站寻找。
本文标签: