我有兴趣制作一个可以从用户个人资料中提取用户电子邮件和地址等信息的胶囊。根据{{3}}的说法,这似乎完全有可能,但是有没有办法在模拟器中创建用户配置文件并对其进行测试?
答案 0 :(得分:3)
不幸的是,Bixby IDE无法测试viv.self或viv.contact。
但是,您可以按照以下步骤在任何支持Bixby的电话(例如S9)上进行设备上的测试。
设备上的测试不像在IDE中进行编译和运行那样简单,而是每个胶囊开发中的必要步骤。 和Bixby一起玩吧!
答案 1 :(得分:2)
在这种情况下,#include<iostream>
#include "MathStack.h"
#include "MathStack.cpp"
using namespace std;
int main()
{
int catchVar;
MathStack stack(5);
cout << "Pushing 3\n";
stack.push(3);
cout << "Pushing 6\n";
stack.push(6);
stack.add();
cout << "The sum is ";
stack.pop(catchVar);
cout << catchVar << endl;
cout << "Pushing 7\n";
stack.push(7);
cout << "Pushing 10\n";
stack.push(10);
stack.sub();
cout << "The difference is ";
stack.pop(catchVar);
cout << catchVar << endl;
cout << "Pushing 2\n";
stack.push(2);
cout << "Pushing 3\n";
stack.push(3);
stack.mult();
cout << "\nThe Product is ";
stack.pop(catchVar);
cout << catchVar << endl;
cout << "Pushing 2\n";
stack.push(2);
cout << "Pushing 10\n";
stack.push(10);
stack.div();
cout << "\nThe Quotient is ";
stack.pop(catchVar);
cout << catchVar << endl;
cout << "Pushing 2\n";
stack.push(2);
cout << "Pushing 5\n";
stack.push(5);
cout << "Pushing 7\n";
stack.push(7);
cout << "Pushing 3\n";
stack.push(3);
cout << "Pushing 1\n";
stack.push(1);
stack.addAll();
cout << "\n Sum of all the elements in the stack ";
stack.pop(catchVar);
cout << catchVar << endl;
cout << "Pushing 2\n";
stack.push(2);
cout << "Pushing 5\n";
stack.push(5);
cout << "Pushing 7\n";
stack.push(7);
cout << "Pushing 3\n";
stack.push(3);
cout << "Pushing 1\n";
stack.push(1);
stack.multAll();
cout << "\n Product of all the elements in the stack ";
stack.pop(catchVar);
cout << catchVar << endl;
system("pause");
return 0;
}
方法可能会有用。该文件未记录,但似乎返回了可以使用的Self对象。
self.GetImaginarySelf
JavaScript代码
action (ReturnMySelf) {
type(Constructor)
description (__DESCRIPTION__)
collect {
computed-input (mySelf) {
type (self.Self)
compute {
intent {
goal: self.GetImaginarySelf
}
}
}
}
output (self.Self)
}
如果这些值不适合您,则可以构造Self对象的JSON表示形式(具有所需的值),然后将其从module.exports.function = function returnMySelf (mySelf) {
return mySelf
}
传回。
希望这会有所帮助!