Questions tagged [limits]

For questions about the limits of a certain feature of a programming language. Note that this site is not for the evaluation mathematical limits without the use of programming.

330 questions
275
votes
8 answers

What is the maximum possible length of a .NET string?

What is the longest string that can be created in .NET? The docs for the String class are silent on this question as far as I can see, so an authoritative answer might require some knowledge of internals. Would the maximum change on a 64-bit…
McKenzieG1
  • 13,960
  • 7
  • 36
  • 42
217
votes
7 answers

maximum value of int

Is there any code to find the maximum value of integer (accordingly to the compiler) in C/C++ like Integer.MaxValue function in java?
d3vdpro
  • 2,887
  • 4
  • 25
  • 29
174
votes
1 answer

mongod, mac os x - rlimits warning

I've been using mongo on my mac os x 10.8 and suddenly yesterday at my logs appeared this warning (and when starting shell it's present too) - WARNING: soft rlimits too low. Number of files is 256, should be at least 1000 Who could explain, what…
Kosmetika
  • 20,774
  • 37
  • 108
  • 172
149
votes
2 answers

Limit ggplot2 axes without removing data (outside limits): zoom

If you specify axis limits in ggplot the outlying points are removed. This is fine for points, but you might want to plot lines that intersect with the specified range, but ggplot's range or xlim/ylim methods removes these. Is there another way to…
geotheory
  • 22,624
  • 29
  • 119
  • 196
105
votes
4 answers

Maximum size for a SQL Server Query? IN clause? Is there a Better Approach

Possible Duplicate: T-SQL WHERE col IN (…) What is the maximum size for a SQL Server query? (# of characters) Max size for an IN clause? I think I saw something about Oracle having a 1000 item limit but you could get around this with ANDing 2 INs…
BuddyJoe
  • 69,735
  • 114
  • 291
  • 466
69
votes
4 answers

Memory errors and list limits?

I need to produce large and big (very) matrices (Markov chains) for scientific purposes. I perform calculus that I put in a list of 20301 elements (=one row of my matrix). I need all those data in memory to proceed next Markov step but i can store…
Taupi
  • 711
  • 1
  • 5
  • 6
65
votes
15 answers

How many times can a file be compressed?

I was thinking about compression, and it seems like there would have to be some sort of limit to the compression that could be applied to it, otherwise it'd be a single byte. So my question is, how many times can I compress a file before: It does…
samoz
  • 56,849
  • 55
  • 141
  • 195
58
votes
2 answers

Why is there still a row limit in Microsoft Excel?

Until Office 2007, Excel has a maximum of 65,000 rows. Office 2007 bumped that up to a max of 1 million rows, which is nicer of course; but I'm curious -- why is there a limit at all? Obviously, performance will slow down exponetially as you…
D-Dog
42
votes
8 answers

How do I increase the /proc/pid/cmdline 4096 byte limit?

For my Java apps with very long classpaths, I cannot see the main class specified near the end of the arg list when using ps. I think this stems from my Ubuntu system's size limit on /proc/pid/cmdline. How can I increase this limit?
user27635
  • 423
  • 1
  • 4
  • 4
38
votes
4 answers

Maximum number of parameters in function declaration

I know that minimum number of parameters in function definition is zero, but what is the maximum number of parameters in function definition? I am asking the question just for the sake of knowledge and out of curiosity, not that I am going to write…
Nawaz
  • 353,942
  • 115
  • 666
  • 851
32
votes
3 answers

Why is the max size of byte[] 2 GB - 57 B?

On my 64-bit machine, this C# code works: new byte[2L * 1024 * 1024 * 1024 - 57] but this one throws an OutOfMemoryException: new byte[2L * 1024 * 1024 * 1024 - 56] Why? I understand that the maximum size of a managed object is 2 GB and that the…
svick
  • 236,525
  • 50
  • 385
  • 514
31
votes
6 answers

How to portably find out min(INT_MAX, abs(INT_MIN))?

How can I portably find out the smallest of INT_MAX and abs(INT_MIN)? (That's the mathematical absolute value of INT_MIN, not a call to the abs function.) It should be as same as INT_MAX in most systems, but I'm looking for a more portable way.
user3810155
29
votes
4 answers

Why is numeric_limits::max() > numeric_limits::infinity()?

I was reading Setting an int to Infinity in C++. I understand that when one needs true infinity, one is supposed to use numeric_limits::infinity(); I guess the rationale behind it is that usually integral types have no values designated for…
legends2k
  • 31,634
  • 25
  • 118
  • 222
28
votes
3 answers

CSS: Is there a limit on how many classes an HTML element can have?

CSS allows an HTML element to have multiple classes:
Nibbles
But is there a limit on how many classes are allowed per item?
Tony the Pony
  • 40,327
  • 71
  • 187
  • 281
28
votes
4 answers

How to reduce CPU limits of kubernetes system resources?

I'd like to keep the number of cores in my GKE cluster below 3. This becomes much more feasible if the CPU limits of the K8s replication controllers and pods are reduced from 100m to at most 50m. Otherwise, the K8s pods alone take 70% of one…
Torsten Bronger
  • 9,899
  • 7
  • 34
  • 41
1
2 3
21 22