Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

ssiegel

@ssiegel
About
Posts
6
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Exceptional coding
    S ssiegel

    It is just a JIT compiler test. A "good" compiler would deduce the intent and eliminate all of the excess excpetion handling and place optimized code inline on the first pass. This eliminates the need for the programmer to think because the compiler has implemented the new DWIM (Do what I mean) facility. Seriously in MVS Assembler it would be XR R0,R0 L R1,VALUE D R0,=A(2) JZ EVEN process odd number J M_010 EVEN DS 0H process even number M_010 DS 0H . . .

    Sam

    The Weird and The Wonderful com regex

  • A piece of ... Art
    S ssiegel

    Must be government work!

    Sam

    The Weird and The Wonderful database

  • atof question
    S ssiegel

    As previously mentioned you should not expect an exact comparision when working with floating point numbers. To check equality you need to compare the differnce to epsilon. If the difference is < or = epsilon then the numbers are equal. Otherwise they are not. This is done as follows: take the absolute value of the difference of the absolute values of the two floating point numbers and compare the result to epsilon. If the difference is less than or equal epsilon then the numbers are equal. if( FLT_EPSILON =< fabsf( fabsf(f1) - fabsf(f2) ) ) printf( "numbers are equal\n" ); else printf( "numbers are not equal\n" ); NOTE: there are double precision variants of epsilon and fabsf. Sam Sam

    C / C++ / MFC csharp visual-studio question

  • hints on using a clistview with a really large dataset
    S ssiegel

    Use a virtual list control. Rather than loading all the rows when the list is created you just load the columns assoicated with the rows that are displayed. You recieve "scrolling" messages, (both up and down), that tell you when additional row data is required. Just look up "virtual list control" in your MSDN documentation. Or check out some of these articles. Code Guru article[^] MSDN Article[^] Other Article[^] Sam

    C / C++ / MFC performance c++ database tutorial question

  • Anyone care to tell me why this is 24 bytes?
    S ssiegel

    In a word: boundary alignment. ID is an unsigned int and MAJOR, an enum, also defaults to an int datatype. Ints are 4-byte fields that are naturally aligned on four byte boundarys. Therefore the compiler places the int fields on four byte boundarys. Doubles go on an eight byte boundary. If the struct does not have the fields ordered in descend size of datatypes, (doubles, ints, short ints and finally char/char array), then the compiler silently inserts unreachable filler alignment bytes. Doubles, ints, etc. are boundary aligned to improve register load performance. On certain types of machines fetching unaligned data can cause an execption. You can use a #pragma to modify the default boundary alighment. You can see the result of what the compiler has done by generating a listing that details the struct. Offset length Field 0 10 name 10 2 unreachable filler inserted by the compiler 12 4 ID 16 1 sex 17 3 unreachable filler inserted by the compiler 20 4 major Total length=24 Sam

    C / C++ / MFC c++ wpf wcf oop question

  • propertysheet: how do I add one to a formview
    S ssiegel

    Hello All I'm attempting to build an SDI application with a splitter window. In the right window, I want to add a propertysheet that contains several propertypages. I am able to do this just fine in dialog box; however, I can't figure out how to add a propersheet/page directly to the right hand window of an SDI application. Your help is appreciated. sam

    C / C++ / MFC help tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups