protocol-buffers

Unable to find artifact “copy-protoc:generate-sources”

…衆ロ難τιáo~ 提交于 2019-12-12 03:28:32
问题 I'm using Google's Protocol Buffers in a project. We use Maven to compile the protobufs automatically ( based on http://vlkan.com/blog/post/2015/11/27/maven-protobuf/ ) Maven gave us tree errors which we were able to solve by installing Maven Plugins on our Eclipse installation. But there is one error we can't solve : org.apache.maven.plugins:maven-dependency-plugin:2.9:copy:copy-protoc:generate-sources This error comes and goes apparently "randomly" and it doesn't break the compilation:

Strange behaviour in protobuf with long strings

孤者浪人 提交于 2019-12-12 01:34:49
问题 I'm trying to send data from a client to a server. both application's are written in java. But they use a tls layer implemented in c++ over SWIG Wrappers. The tls layer expects a string from the client, transmit it to the server-side and notifies the java server application (and passes the string). However this string should contain serialized data. Somehow I struggle to use protobuf for serializing the data. I would like to use a java protobuf class named ToDoListMessage . The protobuf looks

How to map java.lang.Object in .proto file [Protobuf]

我是研究僧i 提交于 2019-12-12 01:25:17
问题 How can I map java.lang.Object in .proto file. I'd like to have smth like: message User { string name = 1; Object field = 2; } 回答1: Disregarding the strangeness of your requirement for a moment: serialize your Java object to byte[] (formally implementing Serializable, or any way you want) and use protobuf value type bytes. But this is really not the way to use protobuf. It's meant to transfer data , not objects . What of your object you would like to transfer over the wire? You cannot

Protobuf c++ extensions use

最后都变了- 提交于 2019-12-12 01:07:59
问题 I'm using google protobuf library version 2.61 and want to use extensions, I have the following proto files: package communication; message BaseMessage { required uint64 server_id = 1; required string uuid = 2; required uint64 message_id = 3; extensions 100 to max; } message GetIdentify { extend BaseMessage { optional GetIdentify message = 100; } required string hostname = 1; } I am able to build the message using the following code: communication::BaseMessage base_message; base_message.set

Converting (parsing) google protocol buffer streams from socket

馋奶兔 提交于 2019-12-11 23:12:45
问题 I am using the following code to parse a message that was SerializedwithCodedStream on to the socket: if ( socket->read(databuffer, size) != -1) { google::protobuf::io::ArrayInputStream array_input(databuffer,size); google::protobuf::io::CodedInputStream coded_input(&array_input); data_model::terminal_data* tData = new data_model::terminal_data(); if (!tData->ParseFromCodedStream(&coded_input)) { return; } else std::cout << tData->symbol_name() << std::endl; } Here is how I serialized it:

C# send/receive Collections using protobuf-net + sockets example

家住魔仙堡 提交于 2019-12-11 20:37:52
问题 I'm looking for complete example of how to transfer collections between 2 machines by using protobuf-net serialization and sockets connection. All I succeed to find is separate parts of code and no one of them can't explain to the noob like me how to combine all this stuff. Following the .proto file: using System; using ProtoBuf; namespace Proto.Transaction { [Serializable] [ProtoContract] public class Transaction { [ProtoMember(1)] public int Type { get; set; } [ProtoMember(2)] public int

spring mvc4 http 404 not found error

强颜欢笑 提交于 2019-12-11 18:09:37
问题 I have seen other similar posts here on stackoverflow - mostly the poster is hitting a link different than what the serving method in the RESTController resolves to. I am making sure (explained below) i am not doing that mistake but still its not working for me.. I am writing a Spring MVC4 based REST controller for a Servlet 2.5 container (weblogic 10.3.6) and I was suggested to follow this sample web.xml for my web app project I have followed this web.xml but I am not sure what the

Performance analysis of using protobuff builders as general data object

假如想象 提交于 2019-12-11 18:06:33
问题 Since protobuffers are a wonderful alternative for java serialisation, we have used it extensively. Also, we have used java builders as general data object. On examining the speeds of constructing an object using message builder ,forming the instance parameter, and normal java primitives forming the object, we found that for an object containing 6 primitive fields, constructing the object using builder(which is the parameter of the object) took 1.1ms whereas using java primitives took only 0

Updating configuration protobuffer in tensorflow object detection

有些话、适合烂在心里 提交于 2019-12-11 16:34:37
问题 In their respective config files, by default the faster-RCNN s have only random horizontal flips enabled and the SSD s have random horizontal flips followed by SSD random crop enabled. I want to add more augmentation options. I wrote the following snippet to do so. import tensorflow as tf from object_detection.protos import pipeline_pb2, preprocessor_pb2 from google.protobuf import text_format def get_configs_from_pipeline_file(pipeline_config_path): pipeline_config = pipeline_pb2

Protocol Buffers source is missing files

吃可爱长大的小学妹 提交于 2019-12-11 15:53:37
问题 For background, see: How to compile google-fhir proto files There seem to be missing .java files when compiling using protoc. I do not see those files here: https://github.com/google/protobuf/tree/master/java/core/src/main/java/com/google/protobuf either. Of course, protoc generated additional files such a Patient.java that were not in the linked folder above. I just need it to compile. symbol: class CodeableConcept location: package com.google.fhir.stu3.proto ./PlanDefinition.java:30950: