limits

C++ variable types limits

Hi, here is a quite simple question(I think), is there a STL library method that provides the limit of a variable type (e.g integer) ? I know these limits differ on different computers but there must be a way to get them through a method, right? Also, would it be really hard to write a method to calculate the limit of a variable type? ...

How would you set a variable to the largest number possible in C?

How would you set a variable to equal infinity (or any guaranteed largest number value) in C? ...

How big is too big (for NTFS)

I have a program and as it's done now, it has a data directory with something like 10-30K files in it and it's starting to cause problems. Should I expect that to cause problems and my only solution to tweak my file structure or does that indicate other problems? ...

C++ equivalent of java.lang.Integer.MIN_VALUE

How can I get an equivalent of java.lang.Integer.MIN_VALUE on C++? ...

What is the maximum number of controls that a VBA form can hold?

I'm currently building an Excel 2003 app that requires a horribly complex form and am worried about limitations on the number of controls. It currently has 154 controls (counted using Me.Controls.Count - this should be accurate, right?) but is probably only about a third complete. The workflow really fits a single form, but I guess I c...

Raising hard limit on RLIMIT_NOFILE system-wide on Linux

We need to raise RLIMIT_NOFILE when running memcached, as we're hitting the default hard limit (1024). However, raising a hard limit requires root, and for various reasons we don't want to have to run memcached or its containing shell as root. Right now we happily run it as a non-root user. Is there a way to raise the hard limit for RLI...

Why is there a limit of max 20 parameters to a clojure function

Hi, there seems to be a limit to the number of parameters a clojure function can take. When defining a function with more than 20 parameters I receive the following: #<CompilerException java.lang.RuntimeException: java.lang.RuntimeException: java.lang.Exception: Can't specify more than 20 params (NO_SOURCE_FILE:0) (NO_SOURCE_FILE:0)> ...

Explaining verity index and document search limits

As present, we currently have a CF8 standard edition server which have some limitations around verity indexing. According to Adobe Verity Server has the following document search limits (limits are for all collections registered to Verity Server): - 10,000 documents for ColdFusion Developer Edition - 125,000 documents for ColdFusio...

C++: defining maximum/minimum limits for a class

Basically what the title says... I have created a class that models time slots in a variable-granularity daily schedule (where for example the first time slot is 30 minutes, but the second time slot can be 40 minutes); the first available slot starts at (a value comparable to) 1. What I want to do now is to define somehow the maximum an...

Resident Set Size (RSS) limit has no effect

The following problem occurs on a machine running Ubuntu 10.04 with the 2.6.32-22-generic kernel: Setting a limit for the Resident Set Size (RSS) of a process does not seem to have any effect. I currently set the limit in Python with the following code: import resource # (100, 100) is the (soft, hard) limit. ~100kb. resource.setrlimit(r...

How to use C defines in ARM assembler

How can I use external defines such as LONG_MIN and LONG_MAX in ARM assembler code? Let's say my_arm.h looks like this: int my_arm(int foo); Let's say I have a my_main.c as follows: ... #include <limits.h> #include "my_arm.h" ... int main (int argc, char *argv[]) { int foo=0; ... printf("My arm assembler function returns (%d)...

Does C99 allow UCHAR_MAX > UINT_MAX

6.3.1.1 States The rank of a signed integer type shall be greater than the rank of any signed integer type with less precision. The rank of long long int shall be greater than the rank of long int, which shall be greater than the rank of int, which shall be greater than the rank of short int, which shall be greater than the rank of sig...

Should I use the C or C++ implementation for returning a maximum size of a variable type?

From a standards standpoint, should I use the following from the C++ <limits> header? UCHAR_MAX which is the c implementation or std::numeric_limits<unsigned char>::max() which is the C++ implementation. The result is equivalent between the two versions but should I choose an implementation based on some standard or on readability and ...

What is an idiomatic way to determine pointer limits in C++?

I'd like to know at compile-time the range of values for a pointer type. limits.h only specifies maximums and minimums for pure number types. I don't wish to use hard-coded constants, and I prefer not to compute a max using sizeof(foo*). ...

What is the relation between PATH_MAX and NAME_MAX, and how do I obtain?

In limits.h, and in various places in the POSIX manpages, there are references to PATH_MAX and NAME_MAX. How do these relate to one another? Where is the official documentation for them? How can I obtain them at run time, and (where relevant) compile time for the C, Python, and GNU (shell) environments? ...

If else Update Category echo display image

HI I Need to display an image when Category Update and that image display upto 3 days i use this but not work $todaytime = time(); $timestamp = $show_wallpaper['timestamp']; $timediffirence = "360000"; $minus = $todaytime - $timestamp; if ($timediffirence > $minus) { $new =...

What is the maximum memory limits per application for Android 2.2?

What is the maximum memory limits per application for Android 2.2? ...

What is the best way to integrate Solr as an index with Oracle as a storage DB?

I have an Oracle database with all the "data", and a Solr index where all this data is indexed. Ideally, I want to be able to run queries like this: select * from data_table where id in ([solr query results for 'search string']); However, one key issue arises: Oracle WILL NOT allow more than 1000 items in the array of items in the "in...

How can I use Google's Geocoding to normalize addresses without violating the terms of service?

I'm working on a API that will accept addresses in searches. We would like to use Google's geocoding service to normalize the addresses before submitting the search criteria to our search engine. This caught my attention: http://code.google.com/apis/maps/documentation/geocoding/index.html#Limits "Note: the Geocoding API may only be u...

Setup "open files" limit in Linux per user. Cannot setup more than 1024

I try to increase open file limit for certain user on CentOS 5.5 Linux. I added a new line to /etc/security/limits.conf: seed hard nofile 10240 Then do test: runuser -s /bin/bash - seed -c "ulimit -S -c 0>/dev/null 2>&1; ulimit -a" 0 core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited...