I need an equivalent to C's pow() function that will work with NSDecimalNumbers. With pow you can use negative numbers e.g. pow(1514,-1234), with NSDecimal's decimalNumberByRaisingToPower: method, you are forced to use an NSUInteger which seems to require a positive value.
I'd like to be able to do something like this:
[decimalNumber d...
I'm pretty sure i'm the one who's just dumb and don't know my data structures...
None the less, i'm going to post it here for you brilliant guys, so one of you may explain to me why this doesn't work:
#include <iostream>
using namespace std;
double data_convert(int n);
int main(void) {
cout << data_convert(sizeof(int));
}
double...
I 'm using Wake Lock to stay awake my phone.
I want to activate sleep mode when I will push the button "Activate"
How can I activate sleep mode?
...
I am building a program which will multiply by 2, and reach long accurate numbers.
Here I build a program in which each digit is stored in a different variable.
When I compile the program, and I type 2^63, It gives me the correct answer.
But when I type 2^64, I get a “Segmentation fault”.
What is it? What can I do?
#include <stdio.h>...
I have a very tough problem I can't solve. I have an app which I can put into airplane mode remotely to save power. I have a thread running which gets the power-save message, removes callbacks for all other threads, puts the phone into airplane mode, and waits a specified number of minutes before waking the phone back up.
When the pho...
We got this Canon IR C3200, and we cant find any way to change how long before Power Saving Mode kicks in, or just disable it.
Anyone know how to do this ?
Best Regards
Lasse Gaardsholt
...
I have two Library Packages, both are defined as process nodes in my main project. How do I use them? I mean how can I load my process node packages and create the windows on the Grid?
...
I m doing this
def power_two(n, base = -1):
result = 2 ** base
if result < n:
base += 1
power_two(n, base)
else:
if result == n:
print base
else:
print base - 1
what is the pythonic way to find largest power of two less than X number?
EDIT
example: power_two(100) ret...
I am 'obviously' just learning programming and I can't seem to figure out what to do in order to get rid if this error. The error is on the second to the last line - the line before: [System.out.print(+windChill);]
Here (written just below), are the list of Java-generated 'possible hints' for the errors that I am getting:
**')' expec...
Is it possible to change the power-saving behaviour of a laptop computer on lid close from hibernate/standby/shutdown to Do Nothing from the .NET Framework?
Edit: it would appear that by setting the value to Standby and blocking the standby from my application, the lid close event can be detected, which is what I'm really after.
I foun...
Possible Duplicate:
Power Efficient Software Coding
Adobe announced at Google I/O that it's next version of Flash 10.1 is going to more efficient for devices where power consumption matters.
This got me to thinking: how do you write code that uses less power? Are there any helpful resources regarding this topic?
My guess wou...
So the problem is in getting real-time values of signal strength for the currently connected base station. When I use neighbor cell info, I always get fluctuating values of RSSI (what is definitely right). However, when I try to get signal strength for current cell I receive constant value (it shows me -63 dBm (25 asu) all the time). The...
I have #include<math.h>,
and I tried to use pow(x, y) and powf(x, y).
but it seems neither of them are under c99 standard.
and I use the command gcc -std=c99 test.c -o test to compile.
what function there exists I can use?
...