serialize

Binary structure for a directory with files

Hi guys, I'm trying to solve the following problem. I want to create a set of directories with files in them , but in memory using C# , using strings / byte arrays, and I am trying to figure out what's the format and byte sequence for all of this. i mean something like <magic sequence for top directory header> <magic sequence for file ...

Limiting unserialize() to return arrays?

Is there any way to limit PHP's unserialize() to only parse arrays? For security reasons. Suppose there is is an evil __unserialize() magic method in the unserialized object I don't wanna call! ...

.serialize() not returning values from dynamically generated form

I'm missing something here. I have a form dynamically loading a form using jquery where .click() pulls in a $.post query that outputs the form with some specific data to .html(). I'm now trying to serialize the data from this form and it's not giving me anything. What am I doing wrong? Code inserting form: $(".edit").click(function...

JsTree: Load custom metadata from an external xml source

I have an existing data structure which is stored as an xml doc. It is essentially a sitemap. Every node has some associated metadata (e.g., keywords and description associated with the node). I would like to be able to use the xml_data plugin to be able to load directly from that source. From a quick look at both the documentation a...

PDO prepare Insert serialize data error

I am trying to insert a serialize data into mySQL using PDO and I'm hitting some syntax error. Have I missed out something? Some simplified coding: $test['1'] = "one"; $condition = serialize($test); $stmt = $dbh->prepare("INSERT INTO weather(condition) VALUES (:condition)"); $stmt->bindParam(":condition",$condition); $stmt->execute(); ...

Binary Serialized File - Delphi

I am trying to deserialize an old file format that was serialized in Delphi, it uses binary seralization. I know nothing about the structure of the file except some very high level records that are in it. What steps would you take to solve this problem? Any tools etc? ...

Loading form in jquery dialog results in empty serialize()

Hi all, I'm creating a customer survey using a jQuery UI dialog. I'm loading an external html file (/survey/survey.htm) which has a form that contains two sections (#part1 and #part2). Each section is shown in the same dialog (#CustomerSurvey") $("#CustomerSurvey") .load("Survey/survey.htm #intro") .dialog({ title: "Cus...

How to serialize class members as attributes to xml in C#.

Hi All, I am trying to serialize my object to xml. A serializer seemingly serializes all data members as children, but I want to serialize all members as attributes, not children. Here's a code example: [DataContract] public class MyDataClass { [DataMember] int foo = 24; [DataMember] string bar = "brabrabra"; } This will b...

Trying to pass an array outside the scope into a function for echo'ing.

Hello my fellow programmers, I have a problem (other than not knowing enough) I need to know how to pass an array from outside the scope to then back inside, in a function which then echo's a specific array index. I have trowlled through the net trying to find solutions, asked fellow programmers for help but nothing thus far has worked...

"Serialize" VHDL record

Suppose I have the following type definition which relies on constants to indicate vector length of the record members: type point_t is record x: std_logic_vector(X_WIDTH-1 downto 0); y: std_logic_vector(Y_WIDTH-1 downto 0); end record; I would like to convert these kind of records into std_logic_vectors to put them into, say...

Send and receive serialize object on UDP in java

Hi to all of you; I am trying to send a serialized object from a server process to a client process in Java using UDP. The problem is that the client is being blocked on the receive method. Can someone help?! here is the server code for sending the object: ClientModel C1= new ClientModel(100,"Noor","Noor",38,38,"asd"); ByteArrayOu...

C/C++ Serialize Fast : Boost vs Cpickle vs Json vs Protocol buffer

Hi, I need to serialize C/C++ structure in a binary string,very fast. Env = Windows,Boost 1.44,Python 2.4. We have 3 structures differents to serialize: Basic : int,double,long,float,string (or char*) Vector: - Each element can be : Basic or Vector or a Map --> vector< Basic,Vector,Map > Map: - Each Value element c...

How save implement class in python?

I have instance of the my class. I want to save implementation of class with instance's pickle copy in file. After, I want to use this instance to another computer where there is no implementation of the my class. I don't want to save text of implementation manually. How can I do this? ...