I was looking across some code and I found an unusual technique to implement public singletons. I have never seen this code style before in any code.
Here's an example of generic singleton code:
...
Type: Posts; User: eros
I was looking across some code and I found an unusual technique to implement public singletons. I have never seen this code style before in any code.
Here's an example of generic singleton code:
...
if(board[1] == "XXX") return 1;
Using Newton's Method, yes i did.
This is what i came up with, not the most efficient but it works
double Sqrt(double num)
{
return Guess(num/2, num, 0, 256);
}
double Guess(double x, double y, int depth, int maxDepth)
{...
Thanks for the idea anduril462, it would be very hard to impliment in my situation. But ill give it a shot soon.
This is what i got from Taters method, it is faster:
BOOL valid(BYTE *file,...
Slightly faster...
int DLL_EXPORT ScanSig(
BYTE *file,
int fileLen,
short *sig,
int sigLen)
{
int i, j;
whiteflags,
BYTE file[] would be a standard PE file. Ranging from 150 bytes to 20mb in length.
short sig[] would be a pattern of shorts, including wildcards. Such as
short sig[] = {...
I have this scanning routine:
int DLL_EXPORT scansig(
BYTE file[],
int fileLen,
short sig[],
int sigLen)
{
int i, j;
Check out Processing.js
This fits your situation!
Thanks for the quick response.
That's good to know.
But what about the part were the function takes only a float and returns a float. Wouldn't casting or converting numbers to floats be slower...
I'm still learning C, and wondering which of these 2 are faster/more efficient and better programming practice.
#define sq(x) x*x
OR
float sq(float x) { return x * x; }