Hi,
How can I cast long to HWND (C++ visual studio 8)?
Long lWindowHandler;
HWND oHwnd = (HWND)lWindowHandler;
But I got the following warning:
warning C4312: 'type cast' : conversion from 'LONG' to 'HWND' of greater size
Thanks.
...
I have several different c# worker applications that run various continuous tasks: sending emails from queue, importing new orders from website database to orders database, making database backups and restores, running data processing for OLTP -> OLAP, and other related tasks. Before, I released these as windows services, but currently I...
Currently, primary keys in our system are 10 digits longs, just over the limit for Java Integers. I want to avoid any maintenance problems down the road caused by numeric overflow in these keys, but at the same time I do not want to sacrifice much system performance to store infinitely large numbers that I will never need.
How do you ha...
What does Java do with long variables while performing addition?
Wrong version 1:
Vector speeds = ... //whatever, speeds.size() returns 2
long estimated = 1l;
long time = speeds.size() + estimated; // time = 21; string concatenation??
Wrong version 2:
Vector speeds = ... //whatever, speeds.size() returns 2
long estimated = 1l;
long ...
looking for the standard bug-proofed way to convert "long names" such as "C:\Documents and settings" to their equivalent "short names" "C:\DOCUME~1"
I need this to run an external process from withing my C# app. It fails if I feed it with paths in the "long name".
...
I'm working on a programming language, and today I got the point where I could compile the factorial function(recursive), however due to the maximum size of an integer the largest I can get is factorial(12). What are some techniques for handling integers of an arbitrary maximum size. The language currently works by translating code to ...
Hi,
Can someone explain me the reason of overflow in variable a? Note that b is bigger than a.
static void Main(string[] args)
{
int i = 2;
long a = 1024 * 1024 * 1024 * i;
long b = 12345678901234567;
System.Console.WriteLine("{0}", a);
System.Console.WriteLine("{0}", b);
System.Console.WriteLine("{0}"...
Is there a data type in eVC++ that is the equivalent of __int64? None of the aliases compile. And I cannot find any of the long types in Math.h.
A third party library would also be acceptable.
...
I am trying to implement floating point operations in a microcontroller and so far I have had ample success.
The problem lies in the way I do multiplication in my computer and it works fine:
unsigned long long gig,mm1,mm2;
unsigned long m,m1,m2;
mm1 = f1.float_parts.mantissa;
mm2 = f2.float_parts.mantissa;
m1 = f1.float_parts.mantiss...
I have a date value, which I'm told is 8 bytes, a single "long" (aka int64) value, and converted to hex:
60f347d15798c901
How can I convert this and values like this, using PHP, into a time/date?
Converting it to decimal gives me:
96 243 71 209 87 152 201 1
A little more info: the original value is a C# DateTime, and should repres...
How can I generate random Int64 and UInt64 values using the Random class in C#?
...
Hello,
Strange how I can do it in C++,but not in C#.
To make it clear,i'll paste the two functions in C++ and then in C# and mark the problematic lines in the C# code with a comment "//error".
What the two function does is encoding the parameter and then add it in to a global variable named byte1seeds.
These are the functions in C++
...
Hey, I am trying to do a project euler problem but it involves adding the digits of a very large number. (100!)
Using java, int and long are too small.
Thanks for any suggestions
...
Hello,
If i try with BitConverter,it requires a byte array and i don't have that.I have a Int32 and i want to convert it to UInt32.
In C++ there was no problem with that.
...
I have some terribly written ASP.NET code that is just not working right (go figure).
I'm charged with maintaining and bug fixing this code, but I can barely make head or high water of it
Unfortunately I don't have the time to rewrite it.
If someone could help this would be great:
(the code): given to you here (some minimal obfusca...
I have a long-running process in MySQL. It has been running for a week. There is one other connection, to a replication master, but I have halted slave processing so there's effectively nothing else going on.
How can I tell if this process is still working? I knew it would take a long time which is why I put it on its own database in...
Hi all,
It appears that when you type in a number in java, the compiler automatically reads it as an integer, which is why when you type in (long) 6000000000 (not in Integer's range) it will complain that 6000000000 is not an integer. To make it shut up, I had to specify 6000000000L. I just learned about this specification.
Are there...
I've always been curious: how can I perform arithmetic operations on very long decimals--for example, calculating pi to the 3000th decimal place (especially in an imperative language)?
...
How can you display a long string, website address, word or set of symbols with automatic line breaks to keep a div width? I guess a wordwrap of sorts. Usually adding a space works but is there a CSS solution such as word-wrap?
For example it (very nastily) overlaps divs, forces horizontal scrolling etc.
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwww...
I'm trying to use a hardcoded 64bit integer in a string variable.
Simplfied I want to do something like this:
$i = 76561197961384956;
$s = "i = $i";
Which should result in s being:
i = 76561197961384956
This does obviously not work as PHP cast big integers to float, therefore s is:
i = 7.65611979614E+16
While several other meth...