• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Programming algorithm help...

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.
Originally posted by: Electric Amish
Originally posted by: FeathersMcGraw
Originally posted by: Electric Amish
CLOSE!! This code gives me 1,2,3 (Highlighted); 4,5,6,7(not Highlighted); 8,9,10 (highlighted), etc...

Okay, (recordnumber - 1) mod 8 < 4.

Yup. That's it.

Notfred- It's probably not 0-based. 😉

Even still, you should get 1,2,3 highlighted; 4,5,6,7 not; 8,9,10,11 highlighted, etc. There shouldn't be groups of 7 when using mod 8.
 
Originally posted by: Skoorb
Originally posted by: ausm
I'll ask my brother he has a PHD in Semi Micro computer architecture.


Ausm
That should be very useful for crystal reports.

Ok Smartass....Here was his reply

Your wish is my command, tell him to use this logical expression:

highlight if (((line-1) & 4) == 0)

or mathematically:

highlight if ((((line-1) / 4) % 1) == 0)

Good Luck

Ausm
 
Originally posted by: ausm
Originally posted by: Skoorb
Originally posted by: ausm
I'll ask my brother he has a PHD in Semi Micro computer architecture.


Ausm
That should be very useful for crystal reports.

Ok Smartass....Here was his reply

Your wish is my command, tell him to use this logical expression:

highlight if (((line-1) & 4) == 0)

or mathematically:

highlight if ((((line-1) / 4) % 1) == 0)

Good Luck

Ausm

Yeah, well, that's wrong. Better luck next time.
 
Originally posted by: notfred
Originally posted by: ausm
Originally posted by: Skoorb
Originally posted by: ausm
I'll ask my brother he has a PHD in Semi Micro computer architecture.


Ausm
That should be very useful for crystal reports.

Ok Smartass....Here was his reply

Your wish is my command, tell him to use this logical expression:

highlight if (((line-1) & 4) == 0)

or mathematically:

highlight if ((((line-1) / 4) % 1) == 0)

Good Luck

Ausm

Yeah, well, that's wrong. Better luck next time.

How is that so keeper of the quaduple post?

Ausm

 
Originally posted by: notfred
Originally posted by: ausm
Originally posted by: Skoorb
Originally posted by: ausm
I'll ask my brother he has a PHD in Semi Micro computer architecture.


Ausm
That should be very useful for crystal reports.

Ok Smartass....Here was his reply

Your wish is my command, tell him to use this logical expression:

highlight if (((line-1) & 4) == 0)

or mathematically:

highlight if ((((line-1) / 4) % 1) == 0)

Good Luck

Ausm

Yeah, well, that's wrong. Better luck next time.

How is that so keeper of the quaduple post?

Ausm

 
Originally posted by: ausm
Originally posted by: notfred
Originally posted by: ausm
Originally posted by: Skoorb
Originally posted by: ausm
I'll ask my brother he has a PHD in Semi Micro computer architecture.


Ausm
That should be very useful for crystal reports.

Ok Smartass....Here was his reply

Your wish is my command, tell him to use this logical expression:

highlight if (((line-1) & 4) == 0)

or mathematically:

highlight if ((((line-1) / 4) % 1) == 0)

Good Luck

Ausm

Yeah, well, that's wrong. Better luck next time.

How is that so keeper of the quaduple post?

Ausm

Takes one to know one, I guess?
 
Originally posted by: notfred
Originally posted by: ausm
Originally posted by: notfred
Originally posted by: ausm
Originally posted by: Skoorb
Originally posted by: ausm
I'll ask my brother he has a PHD in Semi Micro computer architecture.


Ausm
That should be very useful for crystal reports.

Ok Smartass....Here was his reply

Your wish is my command, tell him to use this logical expression:

highlight if (((line-1) & 4) == 0)

or mathematically:

highlight if ((((line-1) / 4) % 1) == 0)

Good Luck

Ausm

Yeah, well, that's wrong. Better luck next time.

How is that so keeper of the quaduple post?

Ausm

Takes one to know one, I guess?

Kiss my ass D!ckhead 😉

Ausm

 
Originally posted by: FeathersMcGraw
Originally posted by: ausm

or mathematically:

highlight if ((((line-1) / 4) % 1) == 0)

That makes no sense, since x mod 1 is 0 for any integer x.

Expect a flaming PM in a minute, that's what he sent me when I told him it was wrong.
 
Originally posted by: notfred
Originally posted by: FeathersMcGraw
Originally posted by: ausm

or mathematically:

highlight if ((((line-1) / 4) % 1) == 0)

That makes no sense, since x mod 1 is 0 for any integer x.

Expect a flaming PM in a minute, that's what he sent me when I told him it was wrong.

Can't take the heat get out of the kitchen 😉

Ausm

 
Originally posted by: Descartes
Originally posted by: notfred
Originally posted by: FeathersMcGraw
Originally posted by: ausm

or mathematically:

highlight if ((((line-1) / 4) % 1) == 0)

That makes no sense, since x mod 1 is 0 for any integer x.

Expect a flaming PM in a minute, that's what he sent me when I told him it was wrong.

But his friend has a PhD!

Jealous and it's my brother asswipe get it right 😉

Don't know why I have to proove anything to you peeps but here is his website checkout the software he created and also look at his publications.

http://www.eecs.umich.edu/~taustin/
Ausm

 
use a flag and for record number increment and do mod 4, every time mod 4 =0 flip flag

in C
int bool=0
for (i=0; i<no_of_records;i++)
{
if(bool=0)
display

if(i%4==0)
bool= ~bool;
}
 
Originally posted by: ausm

Don't know why I have to proove anything to you peeps but here is his website checkout the software he created and also look at his publications.

Being published doesn't mean you don't make mistakes.
 
Originally posted by: ausm
True I agree, Like I have been telling Notfred probaly was to simplistic of a problem for him.

Ausm

The problem was too simple for your PhD brother?
rolleye.gif
 
Back
Top