小编Loe*_*bre的帖子

如何将Image.Source作为字符串

在Xamarin中设置图像的来源很容易:

using Xamarin.Forms;
Image image = new Image;
image.Source = "someImage.jpg";
Run Code Online (Sandbox Code Playgroud)

但我不能做相反的操作.
例如:给定已设置其源的图像,打印源.

Console.WriteLine ("Print Image source ==> {0}",image.Source);
Console.WriteLine ("Print Image source ==> {0}",image.Source.ToString());
Run Code Online (Sandbox Code Playgroud)

......还有一些不连贯的组合.

谁能告诉我如何从图像中获取源(带字符串).

c# image xamarin xamarin.forms

7
推荐指数
1
解决办法
6841
查看次数

google-cloud/aiplatform 顶点 AI 预测服务客户端截断响应 NodeJS

我正在尝试让 aiplatform 客户端在 NodeJS 项目上工作,它似乎有效,我的意思是凭据很好,并且我得到了“有效”响应。但是预测的内容被截断了(使用curl我得到了完整的列表),只有第一行出现在那里。我想知道我是否应该以不同的方式解析 IValues 或者什么。有人在 NodeJS 项目上成功集成了 AIPlatform 库吗?

这是脚本:

/**
 * TODO(developer): Uncomment these variables before running the sample.\
 * (Not necessary if passing values as arguments)
 */
import * as sdk from "@google-cloud/aiplatform";

const project = "generativeai-390315";
const loc = 'us-central1';

// Imports the Google Cloud Prediction service client
const { PredictionServiceClient } = sdk.v1;

// Import the helper module for converting arbitrary protobuf.Value objects.
const { helpers } = sdk;

const credentials = {
    client_email: …
Run Code Online (Sandbox Code Playgroud)

machine-learning node.js google-cloud-ai bart google-cloud-aiplatform

5
推荐指数
1
解决办法
979
查看次数