我在登录尝试,以G +与Java在谷歌AppEngine上的解释这里
在步骤8中,代码获得gPlusId如下
String gPlusId = request.queryParams("gplus_id");
Run Code Online (Sandbox Code Playgroud)
并且此请求应来自步骤6中的ajax调用,该调用仅发送authResult['code']请求,即使authResult没有参数gplus_id
如何以及从何gplus_id而来?!
java ajax google-app-engine oauth-2.0 google-api-java-client
Swift协议定义为空:
public protocol CVarArgType {
}
Run Code Online (Sandbox Code Playgroud)
Apple文档页面未列出任何必需的方法:https : //developer.apple.com/library/ios/documentation/Swift/Reference/Swift_CVarArgType_Protocol/index.html
因此,我希望这可以工作:
extension String : CVarArgType {
}
Run Code Online (Sandbox Code Playgroud)
但出现构建错误:协议要求属性'_cVarArgEncoding'具有类型[[Int]'(Swift.CVarArgType)
鉴于协议定义为空,此要求从何而来?
如果我实现了计算属性,请继续前进:
extension String : CVarArgType {
public var _cVarArgEncoding: [Int] {
get {
//What is expected to be returned here?
}
}
}
Run Code Online (Sandbox Code Playgroud)
预期将以数组形式返回Int什么?
更新:为什么我需要这个?
我有一个名为Identifiable的协议,我的核心数据实体模型类符合该协议,我对此协议进行了扩展,并带有几个约束,以提供一个使用带有格式构造函数的NSPredicate中的id值的函数,该函数需要CVarArgType。
public protocol Identifiable {
typealias IdentityType: CVarArgType, Hashable
var id: IdentityType { get }
}
extension Identifiable where Self: Findable, Self: NSManagedObject {
static public func find(id: IdentityType, context: NSManagedObjectContext) -> Self? …Run Code Online (Sandbox Code Playgroud) 我正在按照书中的教程(iPhone 3D编程)进行操作,该教程使用:
包含一个示例Xcode项目,可以成功编译.
在我找到示例项目之前,我已经手动输入了本书中的代码,但我收到以下详细文件的以下编译错误:
IRenderingEngine.hpp(Xcode文件检查器 - 文件类型="默认 - C++标题")
...
struct IRenderingEngine {
virtual void Initialize(int width, int height) = 0; //2 errors as marked above
virtual void Render() const = 0; //2 errors as marked above
virtual void UpdateAnimation(float timeStep) = 0; //2 errors as marked above
virtual void OnRotate(DeviceOrientation newOrientation) = 0; //2 errors as marked above
virtual ~IRenderingEngine() {} //2 errors as marked above
}; …Run Code Online (Sandbox Code Playgroud)