protocol-buffers

Building Protocol Buffers with Standalone NDK toolchain

我是研究僧i 提交于 2019-12-01 22:49:21
问题 I'm having trouble building Protocol Buffers for Android using a standalone NDK toolchain created with the $NDK/build/tools/make-standalone-toolchain.sh script. The problem I'm having is this: libtool: link: g++ -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -O2 -g -DNDEBUG -o protoc main.o ./.libs/libprotobuf.a ./.libs/libprotoc.a /home/sizeak/AudioFingerprinting/ProtoBuf/jni/src/.libs/libprotobuf.a -lz -lc ./.libs/libprotoc.a(plugin.pb.o): In function `GoogleOnceInit': /home

How to send a byte array to another process in C++

折月煮酒 提交于 2019-12-01 22:43:44
问题 I have been checking on the site for a way to transfer data from a process to another one in C++. I found the method SendMessage() but it does not seem to be able to take a byte array. To explain a little bit the context here, I have an application that send data to another one. We have several objects with different IDs. The app that receives creates a tab for every different objects. If the app that is receiving the data is closed, we start a new process and show the data to the user. If we

Using protoc-gen-go creates a .pb.go that imports google/golang but can't find package

早过忘川 提交于 2019-12-01 22:35:41
I'm using protoc-gen-go to compile C Protocol Buffers into Golang which works great and I can almost go install the package but I get this error: cannot find package "google/protobuf" but I cannot find this package anywhere to download, can anybody tell me what I should do with this? Thanks. I'm following all steps to doing it from here then I run protoc --go_out=. *.proto and I get all my files, but the wrong proto import as @poopoothegoriall said, please use the protobuf from github, other than code-google. the generated .pb.go file will import "github.com/golang/protobuf/proto" UPDATE this

Tensorflow Object Detection Training Killed, Resource starvation?

我的未来我决定 提交于 2019-12-01 21:54:19
This question has partially been asked here and here with no follow-ups, so maybe this is not the venue to ask this question, but I've figured out a little more information that I'm hoping might get an answer to these questions. I've been attempting to train object_detection on my own library of roughly 1k photos. I've been using the provided pipeline config file "ssd_inception_v2_pets.config". And I've set up the training data properly, I believe. The program appears to start training just fine. When it couldn't read the data, it alerted with an error, and I fixed that. My train_config

Building Protocol Buffers with Standalone NDK toolchain

夙愿已清 提交于 2019-12-01 21:28:34
I'm having trouble building Protocol Buffers for Android using a standalone NDK toolchain created with the $NDK/build/tools/make-standalone-toolchain.sh script. The problem I'm having is this: libtool: link: g++ -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -O2 -g -DNDEBUG -o protoc main.o ./.libs/libprotobuf.a ./.libs/libprotoc.a /home/sizeak/AudioFingerprinting/ProtoBuf/jni/src/.libs/libprotobuf.a -lz -lc ./.libs/libprotoc.a(plugin.pb.o): In function `GoogleOnceInit': /home/sizeak/AudioFingerprinting/ProtoBuf/jni/src/./google/protobuf/stubs/once.h:115: undefined reference to

How are shared/placed the int of the ProtoMember/ProtoInclude in ProtoBuf?

雨燕双飞 提交于 2019-12-01 21:10:48
I've several questions on how/where the ID of a [ProtoContract] should be declared. Imagine the following code: [ProtoContract] [ProtoInclude(100, typeof(SomeClassA))]//1) CAN I USE 1 here? public abstract class RootClass{ [ProtoMember(1)] public int NodeId {get;set;} } [ProtoContract] [ProtoInclude(200, typeof(SomeClassC)]//2) Should I declare this here or directly on the RootClass? //3) Can I use the id 100 here? //4) Can I use the id 1 here? or member + include share the id? public class SomeClassA : RootClass{ [ProtoMember(1)]//5) CAN I USE 1 here? Since the parent already use it but it's

Protobuf - Missing toByteArray()?

荒凉一梦 提交于 2019-12-01 19:51:04
问题 I probably just messed up something in my proto file but I can't seem to call the toByteArray function. Using Java and the proto file was compiled with protoc. What I'm calling... BaseMessage.builder = baseMessage = BaseMessage.newBuilder(); Acknowledgement.builder = acknowledgeMessage = Acknowledgement.newBuilder(); acknowledgeMessage.setOk(true); baseMessage.setAcknowledgement(acknowledgeMessage); baseMessage.build(); byte[] send = baseMessage.toByteArray(); And BaseMessage is declared as..

Is protocol buffer serialization output fully deterministic?

老子叫甜甜 提交于 2019-12-01 19:05:28
Given a protocol buffers schema and some data, is the protocol buffers serialization deterministic across libraries and languages? Basically, am I guaranteed that the same data will always serialize in the same way (down to the byte) regardless of the library used? In general, the same data will serialize in exactly the same way. However, this is not guaranteed by the protobuf specifications. For example, the following differences in encoding are allowable and must decode to the same result in all conforming libraries: Encoding fields in different order than the tag number order. Encoding

Why do I see “cannot import name descriptor_pb2” error when using Google Protocol Buffers?

前提是你 提交于 2019-12-01 16:45:02
问题 When using the generated Python code from our protobuf classes, we get this error: cannot import name descriptor_pb2 The equivalent C++ generated code works just fine, so it would appear that there is no problem with our actual proto definitions. This error occurs when I try and import our class, like so: import sys sys.path.append('..\path\to\generated') sys.path.append('..\contrib\protobuf\python') from foobar_pb2 import FooBar Is it correct to append the system paths? I checked in the

Why do I see “cannot import name descriptor_pb2” error when using Google Protocol Buffers?

喜欢而已 提交于 2019-12-01 16:42:06
When using the generated Python code from our protobuf classes, we get this error: cannot import name descriptor_pb2 The equivalent C++ generated code works just fine, so it would appear that there is no problem with our actual proto definitions. This error occurs when I try and import our class, like so: import sys sys.path.append('..\path\to\generated') sys.path.append('..\contrib\protobuf\python') from foobar_pb2 import FooBar Is it correct to append the system paths? I checked in the protobuf\python\google\protobuf directory for descriptor_pb2.py but only found descriptor.py - we're using