我想返回在图遍历查询期间遇到的所有唯一边和所有唯一顶点的列表。这给出了我想要的结果,但我执行了相同的查询两次:
LET eResults = (
FOR v,e
IN 1..2
ANY "entities/198593"
relations
OPTIONS { uniqueEdges: "path", bfs: true }
RETURN DISTINCT KEEP(e, "_key", "_from", "_to", "type")
)
LET vResults = (
FOR v,e
IN 1..2
ANY "entities/198593"
relations
OPTIONS { uniqueEdges: "path", bfs: true }
RETURN DISTINCT KEEP(v, "_key", "name")
)
RETURN { edges: eResults, vertices: vResults}
Run Code Online (Sandbox Code Playgroud)
查询结果,每条边和顶点只包含一次:
[
{
"edges": [
{
"_from": "entities/198593",
"_key": "391330",
"_to": "entities/198603",
"type": 300
},
{
"_from": "entities/198593",
"_key": "391390",
"_to": "entities/198477",
"type": …Run Code Online (Sandbox Code Playgroud) 好的,因此我无法按照Android Studio的要求进行任何开发。我的所有项目到处都是错误,这些错误由Android Studio引起。
注意:我的文件是正确的,这是另一个问题,因为即使我从google代码中导入某些内容也会出错。
当我导入一个项目时,一切都很好,但是在建立索引等之后,所有突然的事情都是红色的,不应该这样。
我的错误例如是:
button1.setOnLongClickListener(new View.OnLongClickListener()
{
....
....
}
Run Code Online (Sandbox Code Playgroud)
好吧,应该不是错误,但: cannot resolve symbol setOnLongClickListener
另一个例子:
button1=(Button) findViewById(R.id.button1);
Run Code Online (Sandbox Code Playgroud)
我将这个确切的代码用于其他按钮,似乎是正确的,我一直使用此行,直到我的Android Studio决定给我一些辛苦的时间,这行很好,此行充满了错误,它们是:
Unknown class: 'button1' , invalid method declaration; return type required, missing method body, or declare abstract
Run Code Online (Sandbox Code Playgroud)
我尝试了20种不应该发生的错误:
我的模块:app build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
applicationId "firstappdevelopments.david.reactiontime"
minSdkVersion 9
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), …Run Code Online (Sandbox Code Playgroud) android manifest gradle android-manifest android-gradle-plugin
我正在创建一个使用 firebase google 身份验证登录的网站。它在所有浏览器中都运行良好。但是当我在我的应用程序中添加这个网站作为 webview 时它不起作用。
显示此错误的网站:
此应用程序运行的环境不支持此操作。“location.protocol”必须是 http、https 或 chrome-extension,并且必须启用 Web 存储。
这里有一些代码如下:
JavaScript 代码:
function login(){
console.log('login called');
function newLoginHappend(user){
if(user){
model_questions(user);
}else{
var provider = new firebase.auth.GoogleAuthProvider();
firebase.auth().signInWithPopup(provider).then(function(result) {
// This gives you a Google Access Token. You can use it to access the Google API.
var token = result.credential.accessToken;
// The signed-in user info.
var user = result.user;
// ...
}).catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
// The …Run Code Online (Sandbox Code Playgroud)