serialization

Send information between applications

|▌冷眼眸甩不掉的悲伤 提交于 2020-07-08 03:41:28
问题 Good day, I have a client application which sends to the server a lists of application the client opens. It particulary sends the file path, file name and hostname. My problem is the sent data should be serialize and deserialize when it is received in the server. I am new to C# so I have very little idea of Serialization. This is the client side private List<int> listedProcesses = new List<int>(); private void SendData() { String processID = ""; String processName = ""; String processPath = "

Do cereal and Boost Serialization use zero-copy?

人盡茶涼 提交于 2020-07-05 05:36:23
问题 I have done some performance comparison between several serialization protocols, including FlatBuffers, Cap'n Proto, Boost serialization and cereal. All the tests are written in C++. I know that FlatBuffers and Cap'n Proto use zero-copy. With zero-copy, serialization time is null but size of serialized objects is bigger. I thought that cereal and Boost serialization didn't use zero-copy. However, serialization time (for int and double) is nearly null, and size of serialized objects is nearly

Do cereal and Boost Serialization use zero-copy?

做~自己de王妃 提交于 2020-07-05 05:36:05
问题 I have done some performance comparison between several serialization protocols, including FlatBuffers, Cap'n Proto, Boost serialization and cereal. All the tests are written in C++. I know that FlatBuffers and Cap'n Proto use zero-copy. With zero-copy, serialization time is null but size of serialized objects is bigger. I thought that cereal and Boost serialization didn't use zero-copy. However, serialization time (for int and double) is nearly null, and size of serialized objects is nearly

How do I use Serde to (de)serialize arrays greater than 32 elements, such as [u8; 128]?

不羁的心 提交于 2020-07-03 05:55:07
问题 I have a struct containing a byte array that I would like to serialize and deserialize to and from binary, but it only works for arrays up to 32 elements. Here is my minimal example code main.rs : #[macro_use] extern crate serde_derive; extern crate serde; extern crate bincode; use bincode::{serialize, deserialize, Infinite}; const BYTECOUNT: usize = 32; // 33 and more does not work, I need 128 type DataArr = [u8; BYTECOUNT]; #[derive(Serialize, Deserialize, Debug)] struct Entry { number: i64

How to view the generated code for derived instances / deriving in Haskell

泄露秘密 提交于 2020-07-02 11:34:27
问题 So, in Haskell, it's really easy to do this: data Foo = Bar | Baz deriving (Read, Show) This is great, but I'd like to be able to pass some data as a string from Haskell to the Elm language. The languages are similar enough that, if I had a Haskell implementation of Read, I could easily convert it to Elm by hand. The problem is, when I use deriving, the function is automatically generated, but I can't actually see what it does. I'm wondering, is there a way to automatically generate the code

Dynamically edit the data between two forms in WinForms c#

一曲冷凌霜 提交于 2020-06-29 04:22:54
问题 I have two forms. The main form is where the user select items, through buttons and they are added to a listview in the form. Then there is a button "Check out" which opens the second form, where the user can edit the created order. I used serialization to save the data so when get back to the previous form, the current state of the list shows up. But when I try to add new items, the previous are replaced. How to make a dynamic communication between the two forms without loosing any data?

Sharing screen via Java socket programming

不想你离开。 提交于 2020-06-29 03:59:46
问题 I am trying to send the live screen of the client to the server. It's a one-way communication till now. They seem to connect, but somehow the whole data might not be sent. I can't understand where the problem lies. Only a still image is shared in spite of a continuous stream of images. Will I have to use another AnimationTimer in the server-class and how? If not, how can I achieve a live sharing of the screen? My code is as follows: Image info class shared by both server & client: package

Another failure at deserializing data with discriminated unions, in F#

我怕爱的太早我们不能终老 提交于 2020-06-29 03:47:31
问题 Following a question where the answer provided a working solution to serialize / deserialize discriminated unions (IgnoreMissingMember setting doesn't seem to work with FSharpLu.Json deserializer) I have now a practical case where this fails (although it works in simpler cases). here is the test code: open System.Collections.Generic open Microsoft.FSharpLu.Json open Newtonsoft.Json open Newtonsoft.Json.Serialization // set up the serialization / deserialization based on answer from: // https:

Java Serialization vs Plain text file [closed]

陌路散爱 提交于 2020-06-28 07:20:14
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 years ago . Improve this question I'm sort of confused. Let's say I have a game that consists of some tiles and players. All these objects need to be saved so I can later start the game and restore the state. I already do this with simple files like an XML file or plain text files, where I

Deserializing XML null dates to DateTime in C#

一曲冷凌霜 提交于 2020-06-27 13:57:48
问题 I have the following XML which needs to be deserialized into C# objects. All the elements work except for date elements which sometimes are empty. <?xml version="1.0" encoding="utf-8" ?> <Output xmlns:b="http://webservices.mycompany.com/Order/17.2.0"> <b:RequestedCompletionDate> <State>Modified</State> <Action>DateSpecified</Action> <Date></Date> </b:RequestedCompletionDate> </Output> The model class is defined as: [System.Xml.Serialization.XmlType(Namespace = "http://webservices.mycompany