Search:

Type: Posts; User: hamster_nz

Page 1 of 10 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    12
    Views
    290

    It's true what they say, premature optimization...

    It's true what they say, premature optimization is the source of all evil :D....

    (i.e. I am doing evil using >>3 and &7 )
  2. Replies
    12
    Views
    290

    I dpn't know if it is of any value, but here is...

    I dpn't know if it is of any value, but here is my prototype for getting and consuming bits from the compressed bitstream.



    static uint32_t grab_bits(struct Inflate_data *d) {
    uint32_t...
  3. Replies
    12
    Views
    290

    Are you decoding PNG 'deflate' compression by any...

    Are you decoding PNG 'deflate' compression by any chance?

    Inspired by your earlier posts I decided that I would attempt this too, and am making good progress.

    Shame the RFC is sort of mostly...
  4. Replies
    18
    Views
    530

    Having read throw the thread I have no clear idea...

    Having read throw the thread I have no clear idea of what you are trying to do, and why you want to do it.

    Are you able to give me some context to this?
  5. Have a read of: The Floating-Point Guide - What...

    Have a read of: The Floating-Point Guide - What Every Programmer Should Know About Floating-Point Arithmetic

    The issue is that the library is calculating pow(10,2) as something just slightly under...
  6. Replies
    2
    Views
    348

    1) See if there are any local programming...

    1) See if there are any local programming standards you have to follow. Indentation, style, portability, licensing, compiler options. Maybe there is a template you can use as the basis for your...
  7. Replies
    5
    Views
    400

    Is Google not working? selection sort in c -...

    Is Google not working?

    selection sort in c - Google Search

    Third hit for me looks OK:

    Selection sort in C | Programming Simplified
  8. GitHub - hamsternz/miniweb: A small, lightweight...

    GitHub - hamsternz/miniweb: A small, lightweight web server - On a Pi 400, 1000 request per second.

    On a laptop 6,000 requests per second on a single core.



    Server Hostname: localhost...
  9. Replies
    35
    Views
    1,334

    Ah, that makes more sense. If I was...

    Ah, that makes more sense.

    If I was implemented this, I would make a hidden 'checksums' file in each directory, with just the local files in that directory, and not inserting the checksums into...
  10. Replies
    35
    Views
    1,334

    I'm still left puzzled as why you want to...

    I'm still left puzzled as why you want to checksum/hash the files... are you intending to store them on media has a high bit error rate? do you want some short 'digest' of the file, allowing you to...
  11. Replies
    35
    Views
    1,334

    If you want to speed things up you want to...

    If you want to speed things up you want to investigate how you can make the most of all the required resources.

    You want to keep many CPU cores busy calculating checksums, while you have a...
  12. Replies
    35
    Views
    1,334

    Visual studio community edition would be a...

    Visual studio community edition would be a reasonable choice.

    Here is a breadcrumb on reading and writing files using the Windows API:

    Opening a File for Reading or Writing - Win32 apps |...
  13. Replies
    4
    Views
    427

    You are writing the first element of the array...

    You are writing the first element of the array over and over.
  14. Replies
    7
    Views
    646

    Lots of thoughts: Code tends to cycle around...

    Lots of thoughts:

    Code tends to cycle around the 'idea'. Different people have different ideas of what 'ideal' code looks like, and everybody nudges code a little to their idea of the ideal...
  15. Replies
    15
    Views
    656

    Windows now also supports mount points inside...

    Windows now also supports mount points inside file systems.

    It just isn't used very often....
  16. Replies
    4
    Views
    438

    I just compiled it up. What you have been show...

    I just compiled it up.

    What you have been show as the correct answer is 414.00 plus 4% tax, and the answer your program gives is 414.80 plus 4% tax.

    So it seems the assignment setter's code...
  17. Replies
    7
    Views
    578

    So if I was in a room 2.4m Hight x 2.5m Long and...

    So if I was in a room 2.4m Hight x 2.5m Long and 2.0m Wide, are you able to show me how to work out the answers for questions b to g?

    Why?

    What I am trying to get you to do is to learn how...
  18. Thread: FIFO Queue

    by hamster_nz
    Replies
    21
    Views
    1,140

    Had a good look at this, and it seems you don't...

    Had a good look at this, and it seems you don't really understand what the dequeue operation should be doing.

    It should remove the oldest item in the queue, and reduce the length of the queue by...
  19. Thread: FIFO Queue

    by hamster_nz
    Replies
    21
    Views
    1,140

    Why does dequeue care if the quque is full or not?

    Why does dequeue care if the quque is full or not?
  20. Thread: DD to DMS

    by hamster_nz
    Replies
    5
    Views
    568

    I've finally got to the point where I no longer...

    I've finally got to the point where I no longer trust floating point - because some things are a little unpredictable, and "float" is only accurate to 25 bits, and just degrees, minutes and seconds...
  21. Thread: DD to DMS

    by hamster_nz
    Replies
    5
    Views
    568

    Do you have some test data and results you can...

    Do you have some test data and results you can share?
  22. Replies
    4
    Views
    541

    It's way easier than that. For 16-bit signed...

    It's way easier than that. For 16-bit signed numbers the most significant bit has a 'place value' of -32768, rather than the 32768 it would have in an unsigned (or longer) value.

    So 0x8011 as a...
  23. Replies
    4
    Views
    541

    Lots of things going on here, but in summary, if...

    Lots of things going on here, but in summary, if 'int' is 16 bits, and you have a overflow the answer will be wrong by 2^16, or 65536.

    So what is 32785-65536? −32,751
  24. Replies
    5
    Views
    524

    It is quite likely that you will still have the...

    It is quite likely that you will still have the same problem. You don't want to speed up the comparison, but reduce the number of comparisons.

    What is the bigger problem you are trying to solve?
  25. It is common to have two-stage locknig... Idle...

    It is common to have two-stage locknig...

    Idle - nobody is accessing the data.

    Shared - everybody cn access, but nobody can change.

    Exclusive - only one thread can access the structure.
    ...
Results 1 to 25 of 241
Page 1 of 10 1 2 3 4