Questions tagged [dataformat]

Use for posts relating to any of various formatting options for structured data (such as for file storage or data-interchange).

Overview

The dataformat tag relates to any of various formatting options for structured data (such as for file storage, or data-interchange).

Details

This is a generally broad topic that applies to any context where the formatting of structured (or semi-structured) data is at issue for various purposes; including:

  • storage,
  • retrieval,
  • transport,
  • version compatibility,
  • tests for validity,
  • compliance with a specification,

or otherwise.

See also

321 questions
177
votes
16 answers

How can I get dict from sqlite query?

db = sqlite.connect("test.sqlite") res = db.execute("select * from table") With iteration I get lists coresponding to the rows. for row in res: print row I can get name of the columns col_name_list = [tuple[0] for tuple in…
Meloun
  • 13,601
  • 17
  • 64
  • 93
26
votes
10 answers

Why is JSON important?

I've only recently heard about JSON (Javascript Object Notation). Can anybody explain why it is considered (by some websites/blogs/etc) to be important? We already have XML, why is JSON better (apart from being 'native to Javascript')? Edit: Hmm,…
Rabarberski
  • 23,854
  • 21
  • 74
  • 96
21
votes
5 answers

Python - mysqlDB, sqlite result as dictionary

When I do someting like sqlite.cursor.execute("SELECT * FROM foo") result = sqlite.cursor.fetchone() I think have to remember the order the columns appear to be able to fetch them out, eg result[0] is id result[1] is first_name is there a way to…
Wizzard
  • 12,582
  • 22
  • 68
  • 101
20
votes
3 answers

Where is the Thrift format specification?

Although Thrift format is relatively widely used (and project still alive), I haven't been able to find specification for the underlying data format. Or formats, given that there are apparently at least two formats; standard one, and compact…
StaxMan
  • 113,358
  • 34
  • 211
  • 239
20
votes
4 answers

T-SQL calculating average time

I have a problem with calculating average time. This is the case: i have multiple rows, in each row there is data in time format so I need to calculate an average time of all rows and multiply it with number of rows but of course I have a problem…
user2158645
  • 201
  • 1
  • 2
  • 4
14
votes
3 answers

Long and wide data – when to use what?

I'm in the process of compiling data from different data sets into one data set for analysis. I'll be doing data exploration, trying different things to find out what regularities may be hidden in the data, so I don't currently have a specific…
user1322720
13
votes
1 answer

SQL: What is the equivalent of json_pretty() in postgreSQL

What is the equivalent of this MySQL function SELECT JSON_PRETTY('{"a": 1, "b": 2, "c": 3}') AS Result FROM table; Formatted JSON: +------------------------------+ | Result | +------------------------------+ | { …
flaxosmith
  • 139
  • 1
  • 4
12
votes
10 answers

Assembler : why BCD exists?

I know BCD is like more intuitive datatype if you don't know binary. But I don't know why to use this encoding, its like don't makes a lot of sense since its waste representation in 4bits (when representation is bigger than 9). Also I think x86 only…
llazzaro
  • 3,970
  • 4
  • 33
  • 47
11
votes
3 answers

How are textual data files parsed in modern C++?

I am (too) often confronted with the task of having to parse textual data files -- the kind of textual structured data representation you used before "everyone" used XML -- that are some kind of industry standard. (There are too many of…
Martin Ba
  • 37,187
  • 33
  • 183
  • 337
10
votes
2 answers

Is there an alternative to the JSON format?

During Laravel installation, I ran into Composer and JavaScript Object Notation (JSON) format. I was wondering whether alternatives to this format exist, that have the same string - value system?
PancakesNutella
  • 163
  • 1
  • 2
  • 8
10
votes
1 answer

matplotlib imshow() with irregular spaced data points

I am trying to put some data into an imshow() plot. My problem is that the data does not come as a MxN array but as a 3xN array (x- and y coordinate and value). The points are NOT arranged as a regular grid but lie within [xmin,xmax,ymin and…
user1805743
  • 1,175
  • 3
  • 13
  • 22
9
votes
6 answers

Guitar tablature data format

I'm writing a quick front end to display guitar tablature. The front end is in Flash but I want to store the tab in some human-readable format. Anyone know of something that already exists? Any suggestions on how to go about it? One idea I got from…
James Fassett
  • 40,306
  • 11
  • 38
  • 43
8
votes
3 answers

can anyone explain the FBX format for me?

i use notepad++ to see the data structure of FBX model but i have some problems understanding it. Here is some info of a cube(side = 10) located in (0,0,0), can anyone tell me what do these members mean? THANKS! Vertices: *24 { a:…
yvetterowe
  • 1,239
  • 7
  • 20
  • 34
8
votes
4 answers

How read Common Data Format (CDF) in Python

I need to read CDF file with using python. I have found libraries but i did not understand how use it. For example at this(Python lib), i need to download CDF lib, i don't know where to download. There is download page for CDF but it seems…
seleucia
  • 1,046
  • 4
  • 17
  • 30
8
votes
9 answers

Recommended data format for describing the rules of chess

I'm going to be writing a chess server and one or more clients for chess and I want to describe the rules of chess (e.g. allowable moves based on game state, rules for when a game is complete) in a programming language independant way. This is a bit…
James Fassett
  • 40,306
  • 11
  • 38
  • 43
1
2 3
21 22