V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  amiwrong123  ›  全部回复第 31 页 / 共 37 页
回复总数  726
1 ... 23  24  25  26  27  28  29  30  31  32 ... 37  
2019-11-11 19:10:28 +08:00
回复了 amiwrong123 创建的主题 程序员 [救救孩子]win10 想用 xrdp 连接上有 gnome 桌面的 Ubuntu
@Yanni0507
nomachine,等会我百度看看
2019-11-11 18:45:01 +08:00
回复了 amiwrong123 创建的主题 程序员 [救救孩子]win10 想用 xrdp 连接上有 gnome 桌面的 Ubuntu
@MaxLi77
@sakura1357
这个也是在 ubuntu 上设置好了后,ubuntu 就不需要屏幕了呗(以后就不关机了,哈哈哈)。还有就是可以剪切板分享嘛
2019-11-11 18:19:51 +08:00
回复了 amiwrong123 创建的主题 程序员 [救救孩子]win10 想用 xrdp 连接上有 gnome 桌面的 Ubuntu
@Death 不好意思,原来这是一个包啊,xorgxrdp 我安了,但好像不行哎
2019-11-11 17:57:12 +08:00
回复了 amiwrong123 创建的主题 程序员 [救救孩子]win10 想用 xrdp 连接上有 gnome 桌面的 Ubuntu
@Death
xorg xrdp 这两个都安了,应该都是最新,不过用的源都阿里的源
@xiaoloudoufu
果然 ,用了这个就好了,怪自己没好好文档了
@xiaoloudoufu
谢谢,我也是刚看见有这个,等会我试试
error: call to implicitly-deleted copy constructor of 'testing::internal::ReturnAction<iauto::hardware::ucom::common::V1_0::EnCommonFuncResult>::Impl<iauto::hardware::ucom::common::V1_0::EnCommonFuncResult, android::hardware::Return<iauto::hardware::ucom::common::V1_0::EnCommonFuncResult> (iauto::hardware::ucom::common::V1_0::EnCommonListenerID)>::Result' (aka 'android::hardware::Return<iauto::hardware::ucom::common::V1_0::EnCommonFuncResult>')
virtual Result Perform(const ArgumentTuple&) { return value_; }
^~~~~~
external/googletest/googlemock/include/gmock/gmock-actions.h:575:14: note: in instantiation of member function 'testing::internal::ReturnAction<iauto::hardware::ucom::common::V1_0::EnCommonFuncResult>::Impl<iauto::hardware::ucom::common::V1_0::EnCommonFuncResult, android::hardware::Return<iauto::hardware::ucom::common::V1_0::EnCommonFuncResult> (iauto::hardware::ucom::common::V1_0::EnCommonListenerID)>::Perform' requested here
explicit Impl(const linked_ptr<R>& value)
^
external/googletest/googlemock/include/gmock/gmock-actions.h:557:26: note: in instantiation of member function 'testing::internal::ReturnAction<iauto::hardware::ucom::common::V1_0::EnCommonFuncResult>::Impl<iauto::hardware::ucom::common::V1_0::EnCommonFuncResult, android::hardware::Return<iauto::hardware::ucom::common::V1_0::EnCommonFuncResult> (iauto::hardware::ucom::common::V1_0::EnCommonListenerID)>::Impl' requested here
return Action<F>(new Impl<R, F>(value_));
^
TestSender.cpp:54:66: note: in instantiation of function template specialization 'testing::internal::ReturnAction<iauto::hardware::ucom::common::V1_0::EnCommonFuncResult>::operator Action<android::hardware::Return<iauto::hardware::ucom::common::V1_0::EnCommonFuncResult> (iauto::hardware::ucom::common::V1_0::EnCommonListenerID)>' requested here
EXPECT_CALL(mockICommon, unRegisterListener(_)).WillOnce(::testing::Return(EnCommonFuncResult::EN_COMMON_RESULT_OK));
^
system/libhidl/base/include/hidl/Status.h:200:5: note: copy constructor is implicitly deleted because 'Return<iauto::hardware::ucom::common::V1_0::EnCommonFuncResult>' has a user-declared move constructor
Return(Return &&other) = default;

给一下附言 1 的完整错误信息吧。

可能是因为 gmock 的::testing::Return 的内部逻辑吧,导致我这个地方总是会调用到 android::hardware::ReturnReturn<EnComdCommonFuncResult>。gmock 的源码我也去看了,但是太难懂了。快哭了
```cpp
template<typename T> class Return : public details::return_status {
private:
T mVal {};
public:
Return(T v) : details::return_status(), mVal{v} {}
Return(Status s) : details::return_status(s) {}

// move-able.
// precondition: "this" has checked status
// postcondition: other is safe to destroy after moving to *this.
Return(Return &&other) = default;
Return &operator=(Return &&) = default;

~Return() = default;

operator T() const {
assertOk();
return mVal;
}

T withDefault(T t) {
return isOk() ? mVal : t;
}
};
```
这是 android::hardware::Return 的源码,因为有这句 Return(Return &&other) = default;,我就不能调用拷贝构造函数了,因为被隐式删除了。

求大佬解答了
2019-10-24 12:34:59 +08:00
回复了 lyver 创建的主题 推广 1024 程序员日~今天没有 Bug! printf("Hello,Gift!")(福利贴)
分母
2019-10-23 11:14:29 +08:00
回复了 bbman 创建的主题 程序员 想屯波书,大家有什么推荐的吗?
java 编程思想,我已经读了两个月了…才一半
2019-10-21 15:53:00 +08:00
回复了 amiwrong123 创建的主题 程序员 Java new 关键字调用默认构造器,在反编译后就看不懂了
@jyounn
也许我应该,把书中的代码弄下来,自己编译出 class 再自己看看。。。
2019-10-21 15:51:32 +08:00
回复了 amiwrong123 创建的主题 程序员 Java new 关键字调用默认构造器,在反编译后就看不懂了
@jyounn
emmm, 源文件就是《 java 编程思想》——17.2.3 小节.使用 abstract 类里面的 Countries 类啊。

源文件确实不是这样的,好多代码顺序都变了。还有就是,有的语句声明和初始化本来是在一句里面,反编译后声明语句和初始化语句也分开了。 但这些变化都没有本质区别。

除了我在帖子里的那个疑问==
2019-10-21 13:04:47 +08:00
回复了 amiwrong123 创建的主题 程序员 Java new 关键字调用默认构造器,在反编译后就看不懂了
是我提问姿势不对吗,怎么还没有大佬现身。。。你们要是不信,可以自己把 net.mindview.util 的 jar 包加入工程看看,找到 Countries 这个 class,再对比原书代码。

下载地址: https://www.cnblogs.com/togeek/p/thiking_in_java_net_mindview_util_package.html
2019-10-17 09:43:04 +08:00
回复了 guolianglt 创建的主题 新手求助 初入 Java
重点在于坚持,口碑不错的入门书就那几本,选一本就开撸
2019-10-13 20:14:30 +08:00
回复了 ZredoC 创建的主题 Java [不懂就问]局部内部类怎么访问其外部方法的同名变量?
不好意思,我看错了。我觉得好像没法访问吧。。应该外部类方法的 n 只是一个局部变量。而内部类只是说可以直接调用到外部类对象的成员,一个局部变量也不是个外部类的成员啊
2019-10-13 20:06:43 +08:00
回复了 ZredoC 创建的主题 Java [不懂就问]局部内部类怎么访问其外部方法的同名变量?
提问前记得百度,网上博客一大堆
2019-10-13 20:04:48 +08:00
回复了 ZredoC 创建的主题 Java [不懂就问]局部内部类怎么访问其外部方法的同名变量?
2019-10-13 16:32:54 +08:00
回复了 amiwrong123 创建的主题 Java [不懂就问] Java .lang.Enum 源码的两个疑问
@xuanyu66
这本书挺好的,之前和它比还纠结 java 核心技术先看哪本,还是选了它。其实更重要的是,选了一本就好好看==
2019-10-13 16:11:13 +08:00
回复了 amiwrong123 创建的主题 Java [不懂就问] Java .lang.Enum 源码的两个疑问
@xuanyu66
是呀,正在学呢。主要是看 java 编程思想这本书,不过看得仔细就读得慢了。关注你一波,以后好再 @你,哈哈哈。
2019-10-13 15:36:03 +08:00
回复了 amiwrong123 创建的主题 Java [不懂就问] Java .lang.Enum 源码的两个疑问
@xuanyu66 #20
你这个例子我懂啦,其实你只是想强调 内部类有没有外部类对象的引用,这个意思嘛。
而 MyEnum$1 是没有持有的。

@xuanyu66 #21
这个我说一下吧,匿名内部类要分情况的:
你 20 楼的说这个例子,就是 new Thread(){},因为它处于 non-static cnotext 这样的上下文里( countDown 是个成员方法嘛,所以就是非静态的上下文),所以这时匿名内部类持有了外部类的引用。

然后你最开始给我说的例子:
public enum MyEnum {
```
A {
void doSomething() { }
},


B {
void doSomethingElse() { }
};
```
其实我认为它在实现上相当于:
```
public static final MyEnum A = new MyEnum{
void doSomething() { }
}
```
但偏偏这个匿名内部类赋值给了一个静态变量,那么它便是 static cnotext 的了。所以此时,匿名内部类不能持有外部类的引用。
1 ... 23  24  25  26  27  28  29  30  31  32 ... 37  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3328 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 28ms · UTC 00:44 · PVG 08:44 · LAX 17:44 · JFK 20:44
Developed with CodeLauncher
♥ Do have faith in what you're doing.