Since when have they been part of standard C++? I think long long is a C++0x feature, is that right? What about long double? Was that already in C++98 or C++03?
I've found what I think may be a bug with Ivar and Objective-C runtime. I'm using XCode 3.2.1 and associated libraries, developing a 64 bit app on X86_64 (MacBook Pro).
Where I would expect the type encoding for the following "longVal" to be 'l', the Ivar encoding is showing a 'q' (which is a 'long long').
Anyone else seeing this? Simplified code…
I'm using mostly GCC to develop my library, but I'd like to ensure cross-compiler compatibility and especially standard conformance as much as possible. For this, I have add several -W... flags to command line. I'd also add -pedantic, but I have a problem with its warning about long long type. The latter is important for my library and is…
I am working on a Chen ERD to model our organizations merchandise. Our central entity is a Style. We have supplemental entities of Color and Season.
I am defining our assortment as the relationship between these three entities, and this relationship itself will have attributes and is defined by the three entities which participate in…
I've seen persistent TCP connections implemented (http://devtcg.blogspot.com/2009/01/push-services-implementing-persistent.html), but my needs are a little different.
I need an Android service that always runs in the background and keeps a long polling connection to an HTTP server and communicates with it using JSON over POST method.
…
Hi, What is the purpose of these new data types? I will normally just use an "int" or a "long" but why do these exist? What new function or purpose do they bring?
We are in a project and we hit some snags. What’s a snag? An activity that takes longer than expected. Actually it takes longer than the time assigned to it by an over pressed PM who accepts an impossible time table and tries his best to make it possible, but I digress (again!). So we have snags and we also have the opposite.…
I wanted to let everyone know that my blog URL will be moving to http://blogs.oracle.com/lindafishman/.
I will focus my future writings to be about the upgrade and adoption strategies of Oracle E-Business Suite customers. To give you a little preview, here is a link to a book of 60 customers who are live on E-Business Suite Release…
On my System:
sizeof(long) in c++ is 4 aka 32bits
sizeof(long) in c# is 8 aka 64 bits
So in my Interop method declarations I've been substituting c++ longs with c# int's however I get the feeling this isn't safe?
Why is a long the same size as an int in c++? And long long is 64bits? What's next a long long long long??
Given 2 32bit ints iMSB and iLSB
int iMSB = 12345678; // Most Significant Bits of file size in Bytes
int iLSB = 87654321; // Least Significant Bits of file size in Bytes
the long long form would be...
// Always positive so use 31 bts
long long full_size = ((long long)iMSB << 31);
full_size += (long long)(iLSB);
…
On a modern 64-Bit machine, how long do you think it takes to iterate through all the positive long numbers?
Below is a code snippet in Java to demonstrate the idea.
Without running the code yourself, how long do you think this code is going to run?
How long will similar code run in other programming languages?
public class…
I wrote a function recently (with help of one guy from SO) that finds maximum of two ints. Here is the code:
long get_max (long(*a)(long(*)(long(*)()),long(*)(long(*)(long**))), long(*b)(long(*)
(long(*)()),long*,long(*)(long(*)()))){return (long)((((long(*)(long(*)(long(*)()),long(
*)(long(*)())))a)>…
long long int A = 3289168178315264;
long long int B = 1470960727228416;
double D = sqrt(5);
long long int out = A + B*D;
printf("%lld",out);
This gives result : -2147483648
I am not able to figure out why (it should be a positive result).
Can somebody help?
Hello all,
I'm trying to initialize an unsigned long long int type. But the compiler is throwing an error "error: integer constant is too large for "long" type ".
The initialization is shown below :
unsigned long long temp = 1298307964911120440;
Can anybody please let me know what the problem is and…
Where to check if type long long is defined? I wanna do something like this:
#ifdef LONGLONG
#define long_long long long
#else
#define long_long long
#endif
Background
I use a Tornado-like server with support for long-polls. Each web pages a user clicks around to sets up a long poll to the server like this:
$.ajax({
type: 'GET',
url: "/mylongpollurl/",
dataType: 'application/json',
success: function(json) {
// I do stuff here
},…
I'm working in Photoshop CS6 and multiple browsers a lot. I'm not using them all at once, so sometimes some applications are minimized to taskbar for hours or days.
The problem is, when I try to maximize them from the taskbar - it sometimes takes longer than starting them! Especially Photoshop feels…
I was trying to move my "Users" folder in Windows 8 as described here and here.
But when I try to copy the folder using "xcopy" in Windows Installation Disk Repair Mode, after some files are copied, I get "insufficient memory". The files on which the error is given are like C:\Users\Bilal\Application…
I'm storing large unicode characters (0x10000+) as long types which eventually need to be converted to NSStrings. Smaller unicode characters can be created as a unichar, and an NSString can be created using
[NSString stringWithCharacters:(const unichar *)characters length:(NSUInteger)length]
So, I…
I'm looking for a structured approach to long-running (hours or more) transactions. As mentioned here, these type of interactions are usually handled by optimistic locking and manual merge strategies.
It would be very handy to have some more structured approach to this type of problem using…
I would like to capture long click events in a ListView, which was easily done using a OnItemLongClickListener. However, that lacks the fading animation of the selector transitioning to a long press that is seen when the long click is handled by onCreateContextMenu. How can I get that…
I'm writing a webapp (Firefox-compatible only) which uses long polling (via jQuery's ajax abilities) to send more-or-less constant updates from the server to the client. I'm concerned about the effects of leaving this running for long periods of time, say, all day or overnight. The…
Working on Mac OS X 10.6.2, Intel, with i686-apple-darwin10-g++-4.2.1, and compiling with the -arch x86_64 flag, I just noticed that while...
std::numeric_limits<long double>::max_exponent10 = 4932
...as is expected, when a long double is actually set to a value with…
Hi
We need to develop a .NET application, basically a WinForms client, which needs to be notified of changes only from the server to update the UI only in case of necessity and not every time.
We initially thought of NetTCPBinding but understood that it has problems with…
I know there's a bunch of APIs out there that do this, but I also know that the hosting environment (being ASP.NET) puts restrictions on what you can reliably do in a separate thread.
I could be completely wrong, so please correct me if I am, this is however what I think…