Is there a stricter strtoull() in any ubiquitous C library?
I want a function that will interpret a string as a strictly unsigned integer, failing when the string overflows, represents a negative number, or does not represent a number.
Knowing the range of variable types needed
So, if I (as the programmer) know that my value will never exceed a small number (say 100) because it is really just a counter-controlled loop or whatever, may I use short
or char
instead of int
for the minute memory savings?
Knowing the range of variable types needed
So, if I (as the programmer) know that my value will never exceed a small number (say 100) because it is really just a counter-controlled loop or whatever, may I use short
or char
instead of int
for the minute memory savings?
Which layer should service errors be handled in?
I am coding in a multitier architecture in Java, and I perform a query to a web service.
Do any notable C extensions include integer types whose behavior is independent of machine word size
An interesting characteristic of C compared with some other languages is that many of its data types are based upon the word size of the target architecture, rather than being specified in absolute terms. While this allows the language to be used to write code on machines that might have difficulty with certain types, it makes it very difficult to design code which will run consistently on different architectures. Consider the code:
Manual repetitive conversion between file types
Let’s say i have an interest in file conversions, but everything should be made by hand and i have multiple output formats (say: csv and excel).
How to track temporal changes in a database?
Imagine a software for theater owners. You can accept reservations for the different cinema halls. Each hall has a different number of seats.
Why do we have to mention the data type of the variable in C
Usually in C, we have to tell the computer the type of data in variable declaration. E.g. in the following program, I want to print the sum of two floating point numbers X and Y.
What Scala type to use for a list of meeting participants
I want to store a number of participants for a meeting. The order of them is not important. The only thing I want to make sure is, that I will be able to add and remove participants, use filter functions (and alike) and get their number. Also duplicates are not allowed.
I started using List
for the method signature, but now I wonder if I should accept a more abstract type. I saw types like Traversable
, TraversableLike
, Iterable
and IterableLike
.
What Scala type to use for a list of meeting participants
I want to store a number of participants for a meeting. The order of them is not important. The only thing I want to make sure is, that I will be able to add and remove participants, use filter functions (and alike) and get their number. Also duplicates are not allowed.
I started using List
for the method signature, but now I wonder if I should accept a more abstract type. I saw types like Traversable
, TraversableLike
, Iterable
and IterableLike
.