Skip to main content

Questions tagged [size]

Size in computing can refer to various dimensions: size in bits, in bytes, in pixels, in memory, in disk space, etc. Please don't use this tag in your posts - it's too generic to usefully categorise your question.

Filter by
Sorted by
Tagged with
471 votes
7 answers
1.1m views

How can I get a file's size in C? [duplicate]

How can I find out the size of a file I opened with an application written in C? I would like to know the size because I want to put the content of the loaded file into a string, which I allocate ...
Nino's user avatar
  • 5,361
335 votes
12 answers
303k views

setState() or markNeedsBuild called during build

class MyHome extends StatefulWidget { @override State<StatefulWidget> createState() => new MyHomePage2(); } class MyHomePage2 extends State<MyHome> { List items = new List(); ...
Divyang Shah's user avatar
  • 3,897
314 votes
7 answers
298k views

Using jQuery To Get Size of Viewport

How do I use jQuery to determine the size of the browser viewport, and to redetect this if the page is resized? I need to make an IFRAME size into this space (coming in a little on each margin). For ...
Volomike's user avatar
  • 24.7k
254 votes
19 answers
785k views

How do you stretch an image to fill a <div> while keeping the image's aspect-ratio?

I need to make this image stretch to the maximum size possible without overflowing it's <div> or skewing the image. I can't predict the aspect-ratio of the image, so there's no way to know ...
Giffyguy's user avatar
  • 21.1k
221 votes
15 answers
142k views

How do I view the size of npm packages?

When I search for packages on NPM, I would like to see package sizes (in KB or MB, etc). NPM doesn’t seem to show this information. How can I determine how much bloat an NPM package will add to my ...
arielorvits's user avatar
  • 5,435
190 votes
7 answers
68k views

How to change size of split screen emacs windows?

I have emacs split horizontally - on top I'm editing Perl code, the bottom is the shell. By default emacs makes the two windows equal in size, but I'd like the shell buffer smaller (maybe half the ...
Steve's user avatar
  • 1,903
179 votes
4 answers
232k views

How to find the size of an array in postgresql

Is there any way to find a size of an array? For Example, CREATE TABLE example (id integer[]) ; INSERT INTO example VALUES ( '{}'); INSERT INTO example VALUES ( '{5,6,7}'); From this, is there any ...
aabi's user avatar
  • 1,901
164 votes
10 answers
97k views

Why are Oracle table/column/index names limited to 30 characters?

I can understand that many years ago there would be this kind of limitation, but nowadays surely this limit could easily be increased. We have naming conventions for objects, but there is always a ...
Chris Gill's user avatar
  • 2,898
160 votes
10 answers
234k views

How to Get True Size of MySQL Database?

I would like to know how much space does my MySQL database use, in order to select a web host. I found the command SHOW TABLE STATUS LIKE 'table_name' so when I do the query, I get something like this:...
marvin's user avatar
  • 1,907
160 votes
4 answers
214k views

How to know the size of the string in bytes?

I'm wondering if I can know how long in bytes for a string in C#, anyone know?
user705414's user avatar
159 votes
7 answers
87k views

C++ : why bool is 8 bits long?

In C++, I'm wondering why the bool type is 8 bits long (on my system), where only one bit is enough to hold the boolean value ? I used to believe it was for performance reasons, but then on a 32 bits ...
Jérôme's user avatar
  • 26.9k
159 votes
2 answers
285k views

Set element width or height in Standards Mode

Is it possible to set width or height of HTML element (ex. <div>) in JavaScript in Standards Mode? Note the following code: <html> <script language="javascript" type="text/javascript"&...
rafalry's user avatar
  • 2,650
157 votes
10 answers
92k views

C pointers : pointing to an array of fixed size

This question goes out to the C gurus out there: In C, it is possible to declare a pointer as follows: char (* p)[10]; .. which basically states that this pointer points to an array of 10 chars. ...
figurassa's user avatar
  • 2,037
156 votes
5 answers
313k views

How to split large text file in windows? [closed]

I have a log file with size of 2.5 GB. Is there any way to split this file into smaller files using windows command prompt?
Albin's user avatar
  • 2,059
155 votes
6 answers
75k views

Count, size, length...too many choices in Ruby?

I can't seem to find a definitive answer on this and I want to make sure I understand this to the "n'th level" :-) a = { "a" => "Hello", "b" => "World" } a.count # 2 a.size # 2 a....
cbmeeks's user avatar
  • 11.4k
153 votes
2 answers
30k views

Size of font in CSS with slash

What does the slash mean here: font: 100%/120%;
Alex's user avatar
  • 44.2k
151 votes
10 answers
237k views

How Big can a Python List Get?

In Python, how big can a list get? I need a list of about 12000 elements. Will I still be able to run list methods such as sorting, etc?
Devoted's user avatar
  • 181k
146 votes
14 answers
181k views

How many bytes in a JavaScript string?

I have a javascript string which is about 500K when being sent from the server in UTF-8. How can I tell its size in JavaScript? I know that JavaScript uses UCS-2, so does that mean 2 bytes per ...
Paul Biggar's user avatar
  • 28.4k
136 votes
3 answers
9k views

How does this piece of code determine array size without using sizeof( )?

Going through some C interview questions, I've found a question stating "How to find the size of an array in C without using the sizeof operator?", with the following solution. It works, but I cannot ...
janojlic's user avatar
  • 1,299
134 votes
7 answers
74k views

How to check an Android device is HDPI screen or MDPI screen?

I want to check this to fetch different images by internet. How to do that?
virsir's user avatar
  • 15.3k
124 votes
17 answers
273k views

PHPExcel auto size column width

I'm trying to auto size the columns of my sheet. I'm writing the file and in the end I try to resize all of my columns. // Add some data $objPHPExcel->setActiveSheetIndex(0) ->...
Alkis Kalogeris's user avatar
122 votes
4 answers
106k views

What does the WPF star do (Width="100*")

What does exactly the star in size terms in WPF mean?
Shimmy Weitzhandler's user avatar
121 votes
1 answer
292k views

Array[n] vs Array[10] - Initializing array with variable vs numeric literal

I am having the following issue with my code: int n = 10; double tenorData[n] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; Returns the following error: error: variable-sized object 'tenorData' may not be ...
msmf14's user avatar
  • 1,489
121 votes
9 answers
366k views

Array Size (Length) in C#

How can I determine size of an array (length / number of items) in C#?
Amal's user avatar
  • 1,435
119 votes
16 answers
158k views

How to get the size of the current screen in WPF?

I know I can get the size of the primary screen by using System.Windows.SystemParameters.PrimaryScreenWidth; System.Windows.SystemParameters.PrimaryScreenHeight; But how do I get the size of the ...
Nils's user avatar
  • 9,881
118 votes
4 answers
441k views

Android screen size HDPI, LDPI, MDPI [duplicate]

I have a background that I need fit in all screen sizes. I have three folders, hdpi, ldpi and mdpi for drawables, but in the emulator there isn't any referense to what resolution hdpi is and what ...
artouiros's user avatar
  • 3,967
111 votes
13 answers
313k views

Determine the size of an InputStream

My current situation is: I have to read a file and put the contents into InputStream. Afterwards I need to place the contents of the InputStream into a byte array which requires (as far as I know) the ...
ChronoXIII's user avatar
  • 1,279
111 votes
9 answers
306k views

Java JTable setting Column Width

I have a JTable in which I set the column size as follows: table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); table.getColumnModel().getColumn(0).setPreferredWidth(27); table.getColumnModel().getColumn(...
Hamza Yerlikaya's user avatar
110 votes
1 answer
52k views

What is the difference between getWidth/Height() and getMeasuredWidth/Height() in Android SDK?

The Android Documentation says that there is two sizes for a view, the measured dimensions and the drawing dimensions. The measured dimension is the one computed in the measure pass (the onMeasure ...
lgfischer's user avatar
  • 1,768
106 votes
5 answers
86k views

WPF: How to display an image at its original size?

I have a problem with displaying images in WPF. Here's my code: <Button HorizontalAlignment="Left" Grid.Column="1" Grid.Row="5" Margin="0,5"> <Button.Content> <...
jiluo's user avatar
  • 2,326
101 votes
6 answers
163k views

Is it really impossible to make a div fit its size to its content?

I'd like to clarify whether it's possible or not to make a div fit its size based on the content's size without having to make elements float or having to make their position absolute. Is it possible?
kettlepot's user avatar
  • 10.9k
96 votes
13 answers
118k views

Flutter - Auto size AlertDialog to fit list content

I need to load list cities dynamically from rest webservice and let user choose a city from alert dialog. My code: createDialog() { fetchCities().then((response) { showDialog( ...
user1209216's user avatar
  • 7,756
93 votes
15 answers
120k views

Determine size of dynamically allocated memory in C

Is there a way in C to find out the size of dynamically allocated memory? For example, after char* p = malloc (100); Is there a way to find out the size of memory associated with p?
s_itbhu's user avatar
  • 1,237
91 votes
7 answers
405k views

How to change the size of the font of a JLabel to take the maximum size

I have a JLabel in a Container. The defaut size of the font is very small. I would like that the text of the JLabel to take the maximum size. How can I do that?
g123k's user avatar
  • 3,816
90 votes
3 answers
150k views

How to load specific image from assets with Swift [duplicate]

I'm new to Swift and I want to load a special image from assets. For example I have: image 1 for iphone 4s = [email protected] image 2 for iphone 5/5s = [email protected] image 3 for ...
Ghost's user avatar
  • 943
90 votes
4 answers
7k views

Why is the size of a function in C always 1 byte?

When we check the size of a function using sizeof(), we always get 1 byte. What does this 1 byte signify?
user1645461's user avatar
90 votes
2 answers
87k views

Maximum size of a PHP session

What is the maximum size that can be stored in a PHP session?
Roch's user avatar
  • 22k
88 votes
13 answers
68k views

Calculating usage of localStorage space

I am creating an app using the Bespin editor and HTML5's localStorage. It stores all files locally and helps with grammar, uses JSLint and some other parsers for CSS and HTML to aid the user. I want ...
JeroenEijkhof's user avatar
87 votes
18 answers
288k views

change array size

Is it possible to change an array size after declaration? If not, is there any alternative to arrays? I do not want to create an array with a size of 1000, but I do not know the size of the array when ...
user avatar
83 votes
4 answers
86k views

C# FileStream : Optimal buffer size for writing large files?

Suppose I'm writing a couple of files to disk, between 2MB and 5GB. What are sensible buffer values for the FileStream ? Is it sensible to work with buffersizes of several megabytes, or should I ...
Pygmy's user avatar
  • 1,896
81 votes
2 answers
71k views

Reducing the size of the .svn folder

In our project we made the decision to reduce the build time by using pre-built binaries. Weekly/monthly we create a stable release and commit it to the repository. The build uses these binaries ...
Shane Gannon's user avatar
  • 7,420
80 votes
6 answers
95k views

Where can I find default -Xss (stack size) value for Oracle JVM?

Has anyone ever found a single JVM document listing default -Xss values for various versions of the Oracle JVM, and for different OS's? I've been able to find this table in the jrockit docs, but that'...
charlie arehart's user avatar
79 votes
3 answers
96k views

How to get matplotlib figure size

For a project, I need to know the current size (in pixels) of my matplotlib figure, but I can't find how to do this. Does anyone know how to do this ?
Tristan's user avatar
  • 813
77 votes
8 answers
169k views

How much data can a List can hold at the maximum?

How much data can be added in java.util.List in Java at the maximum? Is there any default size of an ArrayList?
Paul's user avatar
  • 1,390
76 votes
10 answers
56k views

ImageView be a square with dynamic width?

I have a GridView with ImageViews inside. I have 3 of them for each row. I can set correctly the width with WRAP_CONTENT and scaleType = CENTER_CROP, but I don't know how to set the ImageView's size ...
Andrea's user avatar
  • 4,363
74 votes
4 answers
136k views

Scale and size of plot in RStudio shiny

Related, but only talks about the allocated plot space in general, not how to directly set the plot image size and then scale it to fill the desired space Shiny Chart Space Allocation I'm creating a ...
Hendy's user avatar
  • 10.5k
72 votes
7 answers
137k views

How to know bytes size of python object like arrays and dictionaries? - The simple way

I was looking for a easy way to know bytes size of arrays and dictionaries object, like [ [1,2,3], [4,5,6] ] or { 1:{2:2} } Many topics say to use pylab, for example: from pylab import * A = ...
crandrades's user avatar
70 votes
2 answers
67k views

Set variable text column width in printf

In order to determine the size of the column in C language we use %<number>d. For instance, I can type %3d and it will give me a column of width=3. My problem is that my number after the % is a ...
Alaa M.'s user avatar
  • 5,188
69 votes
3 answers
36k views

SQL Azure table size

In mssql2005 when I want to get size of table in MBs, I use EXEC sp_spaceused 'table'. Is there any way to get space used by particular table in SQL Azure using some query or API?
user224564's user avatar
  • 1,323
67 votes
4 answers
27k views

Can someone explain this template code that gives me the size of an array? [duplicate]

template<typename T, size_t n> size_t array_size(const T (&)[n]) { return n; } The part that I don't get is the parameters for this template function. What happens with the array when I ...
marsol0x's user avatar
  • 715

1
2 3 4 5
143