The real kooks.
- From: Jeff…Relf <Jeff_Relf@xxxxxxxxx>
- Date: 30 Jun 2006 12:59:28 GMT
Hi Greg_Hansen, You wrote:
I've come to recognize the surest sign of the crank as having an
attitude along the lines of " Why is everyone stupid except for me ? "
Amen. I hate to keep brown-nosing you, Greg_Hansen;
but you are the most talented, sensitive, level-headed guy here.
I'd like to add this bit though...
As a computer programmer I know that it's very naive to assume
that someone is wrong or a kook just because you don't understand him.
Laming someone for their English skills is even less forgivable.
For example, does the following C++, Win_XP code make sense to you ?
In depth analysis of the sorted/dynamic list and tons of Usenet posts,
from random newsgroups, proves that it _Works_... and works well.
In order to create a Direct_Draw surface for a particular character/color,
the code below uses a binary search to look up a Non_ASCII, Unicode character;
inserting it into the sorted/dynamic list if it wasn't found.
From: www.Cotse.NET/users/jeffrelf/X.CPP
GyP Surface_Info ( wchar_t Ch ) {
if ( Ch <= Highest_Ascii ) return Gy.BB [ Ch - Lowest_Ascii ];
GyA BB = Gy.BB + ( Highest_Ascii - Lowest_Ascii + 1 )
, EE = Gy.PP + 1, PP ; GyP P ; int Greater_Ch ;
LOOP { // This LOOP is the heart of the binary search.
PP = BB + ( EE - BB ) / 2 ;
if ( PP == Gy.PP + 1 ) { // Hit the end of the list, insert it here.
Greater_Ch = 0 ; break ; }
P = * PP ; Greater_Ch = Ch - P->Ch ;
if ( ! Greater_Ch ) return P ;
if ( Greater_Ch > 0 ) { if ( PP >= EE ) break ; BB = PP + 1 ; }
else { if ( PP <= BB ) break ; EE = PP - 1 ; } }
SIZE XY ; GetTextExtentPoint32( DC, & Ch, 1, & XY );
int Wide = XY.cx * 100 / XY.cy > 64 ;
int _PP = PP - Gy.BB ; Inc( Gy );
// Use this for a simple test: Jeff_Relf_2006_May_23_6RJ1@xxxxxxxxx
EE = Gy.PP + 1, PP = Gy.BB + _PP ; int After = EE - PP ;
if ( Greater_Ch > 0 ) // Ch > * PP, so insert Ch after PP.
PP ++, -- After ;
if ( After > 0 ) memmove( PP + 1, PP, After * Sz_Ptr );
* PP = P = ( GyP ) Malloc ( sizeof * P ) ;
P->Ch = Ch, P->Wide = 1 + Wide ; return P ; }
.
- Follow-Ups:
- Re: The real kooks.
- From: Phineas T Puddleduck
- Re: The real kooks.
- From: T Wake
- Re: The real kooks.
- References:
- Prev by Date: Is there a relationship between optical band gap and activation energy?
- Next by Date: Re: Pulse Function
- Previous by thread: Re: Is it possible to be an important and influential amateur physicist?
- Next by thread: Re: The real kooks.
- Index(es):
Relevant Pages
|
Loading