size

Determine the size of a block device

How can I find out the size of a block device, such as /dev/sda? Running ls -l gives no useful information. ...

GCC C++ "Hello World" program -> .exe is 500kb big when compiled on Windows. How can I reduce its size?

Hello, I just recently started learning C++ - I am using nuwen's version of MingW on Windows, using NetBeans as an IDE (I have also MSDN AA Version of MSVC 2008, though I don't use it very often). When compiling this simple program: #include <iostream> using namespace std; int dog, cat, bird, fish; void f(int pet) { cout << "pet i...

Do certain characters take more bytes than others?

I'm not very experienced with lower level things such as howmany bytes a character is. I tried finding out if one character equals one byte, but without success. I need to set a delimiter used for socket connections between a server and clients. This delimiter has to be as small (in bytes) as possible, to minimize bandwidth. The curren...

Is there a "function size profiler" out there?

After three years working on a C++ project, the executable has grown to 4 MB. I'd like to see where all this space is going. Is there a tool that could report what the biggest space hogs are? It would be nice to see the size by class (all functions in a class), by template (all instantiations), and by library (how much belongs to the C s...

VC++: How to get the time and date of a file?

How do I get the file size and date stamp of a file on Windows in C++, given its path? ...

Reasonable size of a Tree and Dictionary

I'm currently implementing a very complex tree structure to allow for near-instant data access, instead of re-processing on each request. I'm just wondering if there is a theoretical, or practical, limit at which the size of a tree becomes too big, or a point at which a dictionary becomes too collision-filled to function correctly/quick...

How important is size in an application?

When creating applications (Java, run on a normal computer). How important is program size for users? For example, would it be necessary to replace .png's with .jpg's, convert .wav's to .midi's, or strip down libraries to save space, or do users generally not care if my program is 5mb when it could be 50kb if stripped down? Thanks. ...

How to set WPF window's startup ClientSize?

I want to set my WPF window's initial client size. I'm not seeing a straightforward way to do this. Specifically, when my window opens, I want it to be sized just big enough for its contents to fit without needing scrollbars. But after it's shown, I want the window to be freely resizable (either larger or smaller). If I set Width and H...

Can Javascript access native image size?

I'm writing a jQuery function where I'd like to access both the native size of an image, and the size specified for it on the page. I'd like to set a variable for each. How is that done? ...

How to get the size of a remote file with iPhone SDK ?

Hello everybody, My iPhone application downloads large files from the internet (videos, for instance). I'd like to display a progress bar, so I need to get the size of the remote file I'm trying to download (before downloading it, of course). I've searched, again and again, but nothing is working. Is there any way to do that ? Thank ...

Get an array from an HTML page?

I'm rather new to HTML programming. I understand the basics of interactive collection of input via forms. I'd like to collect some data computed by a JavaScript function during execution of a page. Not being able to think of an alternative, I think the way to do that is to enter the function result into a form variable. How do I do ...

I need to know the size of an inputstream [Java]

My current situation is I have to read in a file and place it in an InputStream, and then also place the contents of the InputStreaminto a byte array which requires that i know the size of the InputStream. Any ideas? As requested, i will show the input stream that i am creating from an uploaded file InputStream uploadedStream = null; ...

What is the underlying type of a c++ enum?

This may have been answered elsewhere but I could not find a suitable response. I have this code: enum enumWizardPage { WP_NONE = 0x00, WP_CMDID = 0x01, WP_LEAGUES = 0x02, WP_TEAMS = 0x04, WP_COMP = 0x08, WP_DIVISIONS = 0x10, WP_FORMULAS = 0x20, WP_FINISHED = 0x40, }; Which is legacy and I have...

how to get the size of a dir programatically in linux ?

I want to get the exact size of a particular dir in linux through a C program. I tried using statfs(path,struct statfs &) but it doesn't give exact size. I also tried with stat() but it returns size as 4096 for any dir ! Please suggest me the way through which I can get the exact size of dir just like we get after "du -sh dirPath" comma...

[Flex] get width of dynamically created custom uicomponent

Hello! I have some custom components, that derived from UIComponent. I overloaded the updateDisplayList so they have custom look. I've created a layouter that lays out these custom components, but to place them correctly, I have to know the custom componets width, height. They are created dynamically. After all of them created (creation...

Windows Mobile form size

I’m creating a windows mobile app which uses a custom GUI. It has an image as background and some text and images rendered on it. I want to do as little image processing in the app itself, so I’m creating different skins for different screen resolutions. If I need to support another screen resolution I’ll just add another skin. But what...

How can I scale an entire web page with CSS?

Using Firefox, you can enlarge an entire web page by simply pressing CTRL +. What this does is proportionally enlarge the entire web page (fonts, images, etc). How can I replicate the same functionality using simply CSS? Is there something like page-size: 150% (which would increase the entire page portions by x%?) ...

Dynamic changes to thread stack size in Solaris 9 ?

Hello, I am looking for a configurable / tunable on Solaris 9 through which I can change the default thread stack size without recompiling the code to use "pthread_attr_setstacksize" For example on HPUX 11.11 / 11.23 the environment variable "PTHREAD_DEFAULT_STACK_SIZE" can be exported (available via HPUX patches PHCO_38307 / PHCO_3895...

jvm - what is the optimal freeheap to totalheap ratio?

what is the optimal freeheap to totalheap ratio? At what values of this ratio should I consider increasing the heap size/ decreasing the heap size? ...

How to get the size of the drawing area of a Windows Form?

Hello, How does one get the size of the drawing area in a Windows Form? The Size, Width and Height properties return it for the entire form, whereas I'm looking for the area marked in the linked diagram by the white arrows: http://imgur.com/RhpZv.png Thanks! ...