representation

Graphical representation of an app using Visual Studio 2008 Professional edition.

Is there a way in Visual Studio 2008 Professional edition to create a graphical representation of an application? What I am looking for is a flowchart or other design graph that shows each program in the app and how they relate to other programs and files in the app. I can create one using Visio, but wanted to know if there is somethin...

Nicely representing a floating-point number in python

I want to represent a floating-point number as a string rounded to some number of significant digits, and never using the exponential format. Essentially, I want to display any floating-point number and make sure it looks nice. There are several parts to this problem: I need to be able to specify the number of significant digits. The ...

How to model rules for generating geometric patterns?

For my problem it would be best to find a numeric representation of kazakh national ornaments for generating new ones. But other approaches are also fine. The ornaments essentially consist of combinations of relatively basic ornaments. Usually the ornaments are symmetrical. Here are few examples of basic elements: (The images ...

Python proper use of __str__ and __repr__

Hey, My current project requires extensive use of bit fields. I found a simple, functional recipe for bit a field class but it was lacking a few features I needed, so I decided to extend it. I've just got to implementing __str__ and __repr__ and I want to make sure I'm following convention. __str__ is supposed to be informal and conci...

Building json from folder structure and vice versa

Hi, I'm trying to generate a json representation from a folder structure. Examplee folder/file structure: folder |_ meta.xml |_ subdir1 |_ textfile1.txt |_ subdir2 |_ textfile2.txt Manually generate the json representation of this structure: def builder = new net.sf.json.groovy.JsonGroovyBuilder() def json = builder.dir { ...

Best way to handle light weight (skeletal) representation in web service XML schema?

I'm new to the whole web service space, so pardon the question if it seems stupid or obvious! I have a number of entities that can be provided by a new web service that I am creating. Some of these entities are composed of very large graphs of objects. However, at times the client will want to search for some of these entities and...

What is the binary representation of a boolean value in c#

I know that a boolean value is 1 byte (8 bits long) But I would like to know is what is its binary representation. e.g. decimal => binary 4 => 100 (0000 0100) 8 => 1000 (0000 1000) bool value => ??? ...

Given a decompressed gzip file, is there any way to recreate the exact original gzip file?

Given a gzip file Z, if I decompress it to Z', is there any way I can recompress it to get the exact same gzip file Z back? After a cursory reading of the DEFLATE format, I am guessing no, as any given file may have multiple representations in DEFLATE stream format, and there is no way to determine which one was originally used. Can anyb...

What type should I use for binary representation of C enum?

As I know C enum is unsigned integer, but this may vary by implementation. What type should I use for the enum in binary representation? *PS 'binary representation' means byte-array. I want to serialize enum values to socket to inter-operate with other programs. ...

Converting a hex-string representation to actual bytes in Python

i need to load the third column of this text file as a hex string http://www.netmite.com/android/mydroid/1.6/external/skia/emoji/gmojiraw.txt >>> open('gmojiraw.txt').read().split('\n')[0].split('\t')[2] '\\xF3\\xBE\\x80\\x80' how do i open the file so that i can get the third column as hex string: '\xF3\xBE\x80\x80' i also tried ...

Biggest number in computer ever

Just asked by my 5 year old kid: what is the biggest number in the computer? We are not talking about max number for a specific data types, but the biggest number that a computer can represent. Infinity is not allowed. UPDATE my kid always wants to print as well, so lets say the computer needs to print this number and the kid t...

Binary representation of a .NET Decimal

Hey all, quick question: How does a .NET decimal type get represented in binary in memory? We all know how floating-point numbers are stored and the thusly the reasons for the inaccuracy thereof, but I can't find any information about decimal except the following: Apparently more accurate than floating-point numbers Takes 128 bits of...

Python: pytz returning unusable __repr__()

I understand that repr()'s purpose is to return a string, that can be used to be evaluated as a python command and return the same object. Unfortunately, pytz does not seem to be very friendly with this function, although it should be quite easy, since pytz instances are created with a single call: import datetime, pytz now = datetime...

How to use Int64 in C#

Hi,The question is easy! How do you represent a 64 bit int in C#? ...

how is a file represented on a disk

Hello, so I want to ask, and forgive me if this is obvious, or newbie question: if I create a file, say a text file - save it, (I'm using Ubuntu), so this file I have created, has some extra information associated with it, such as, the place on my hard drive where it has been saved. How to examine this information? Where does this inform...

Representration of a Empty Class Array

Hi Guys, I am actually looking at getting the method, whose name is stored in the string "methodName", from the Class "CC1" using Java Reflection. Method actualMethod= CC1.getMethod(methodName, parameterTypes); This is the syntax. The problem is the method takes no parameter. How do I represent that in the parameterTypes ? where p...