representation

Replacement for XML to represent Data structures in C++

At work we have a testing tool that is used to send queries to a data source. The tool takes in input as XML files. The XML files were simple and easy to parse as long as the data structures we tried to represent were one layer deep. But now these data structures are more complex and representing them in XML is getting to be highly confu...

What's the best format to represent one day?

How to represent the start and end times for one day? Using October 23, 2008 as an example, is it start 2008-10-23 12:00:00 AM and end 2008-10-23 11:59:59 PM? ...

What is the best modeling methodology for representing software system?

What is the best modeling methodology for representing software system. I mean like UML and so on. Is UML better or is there something better than that out there? My need is to represent graphically my web application , which is a 3-tier architecture. I need a engineering model methodology like UML to depict the entire software system f...

Is the semantic of the data integral part of REST?

This is a follow up on a question asking for an explanation of REST. As you can see from the comments to my answer, we've had a small argument with Darrel Miller on the best media representation of the resources. We've had a further email discussion that resulted in this question. The main difference between Darrel's and mine understan...

Haskell - How to best to represent a programming language's grammar?

Hey, I've been looking at Haskell and I'd quite like to write a compiler (as a learning exercise) in it, since a lot of it's innate features can be readily applied to a compiler (particularly a recursive decent compiler). What I can't quite get my head around is how to represent a language's grammar in a Haskell-ian way. My first thoug...

Display the binary representation of a number in C?

Still learning C and I was wondering: Given a number, is it possible to do something like the following? char a = 5; printf("binary representation of a = %b",a); > 101 Or would i have to write my own method to do the transformation to binary? ...

Compilers and negative numbers representations

Recently I was confused by this question. Maybe because I didn't read language specifications (it's my fault, I know). C99 standard doesn't say which negative numbers representation should be used by compiler. I always thought that the only right way to store negative numbers is two's complement (in most cases). So here's my question: ...

Good Collision Representation of Player Character in 3d Platform Game?

I am trying to make a simple 3d platform game. The issue I'm having is with the collision detection and response. I am currently representing my player character (for wall and floor collisions) with a sphere. I employ a simple gravity force and directional forces using the arrow keys for movement. My problem occurs when I come to an ...

What does Canonical Representation mean and its potential vulnerability to websites

I searched on google for a meaning of canonical representation and turned up documents that are entirely too cryptic. Can anyone provide a quick explanation of canonical representation and also what are some typical vulnerabilities in websites to canonical representation attacks? ...

When do you decide to represent something as a vector?

In information retrieval, the words in the documents were represented as a "Term Vector", they did it primarily to check the angle between two vectors. When have you represented something as a vector in your work and what is the common heuristic that you use to represent an entity as a vector? ...

subclassing int to attain a Hex representation

Basically I want to have access to all standard python int operators, eg __and__ and __xor__ etc, specifically whenever the result is finally printed I want it represented in Hex format. (Kind of like putting my calculator into Hex mode) class Hex(int): def __repr__(self): return "0x%x"%self __str__=__repr__ # this certainly he...

C# binary constants representation

I am really stumped on this one. In C# there is a hexadecimal constants representation format as below : int a = 0xAF2323F5; is there a binary constants representation format? ...

Transient REST Representations

Let's say I have a RESTful, hypertext-driven service that models an ice cream store. To help manage my store better, I want to be able to display a daily report listing quantity and dollar value of each kind of ice cream sold. It seems like this reporting capability could be exposed as a resource called DailyReport. A DailyReport can be...

Visual / artistic representations of code

I don't know if there is a name for this. What I am interested in is what sort of graphical programs there are for representing code or code development in a high level, abstract and beautiful way. The only example I know of something like this is a video I saw a while ago which used glowing orbs moving around a repository to show user...

Changing internal representation in runtime

UPDATE The main questions remain the ones under the example, but I guess it boils down to : **If you have a type where 99% of the values could be represented in one fast, powerfull type, and only 1% in a very heavy type, (say int vs. BigInteger) How to represent it?? ** A school we learned a lot about internal rep...

What is the difference between category/category_id/item_id and category?category_id={}&item_id={} in REST?

I just began looking at REST and was wondering what the basic difference between the two representations was. The first one looks pretty nice to me and the second one has to pass some attribute values but the underlying logic seems to be boiling to almost the same thing (I could be mistaken though) http://url/category/category_id/item_i...

How are things represented visually?

Hello, I'm a beginner and I was wondering how pictures,video,windows and buttons etc are represented visually on the screen. I'm not asking whether it was made from for example gtk or wxwidgets, My question is what is the fundamental idea behind making the pixels come up the way they do. And what exactly does GUI library use to put them ...

Generating textual representation of directory contents

I'm looking for a script to generate the graphical-ish textual representations of directory structures that you see around. Something that I can run like this: james@computer:/.../basedir$ listdir . basedir |-firstsubdir | |-file | `-subsubdir | |-file1 | |-file2 | |-file3 | `-file4 `-secondsubdir james@computer:/.../basedir$ ...

How is unsigned int/long represented

I was reading some assembly tutorial in which there were explained the signed integers and the unsigned integers and the difference between their representation in computer memory. I remember something like that there was some bit at the beginning at the number so it tells whether the integer is unsigned or signed. If someone knows it,...

Graph/tree representation and recursion.

Hey there, I'm currently writing an optimization algorithm in MATLAB, at which I completely suck, therefore I could really use your help. I'm really struggling to find a good way of representing a graph (or well more like a tree with several roots) which would look more or less like this: Basically 11/12/13 are our roots (stage 0), 2...