Search:

Type: Posts; User: kerrymaid

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    1,226

    Thanks iMalc

    Thanks iMalc
  2. Replies
    2
    Views
    1,226

    line intersection (again)

    Hi all,

    Hopefully someone can point me in the right direction. I posted sometime ago ago querying code for the intersection of a line...
  3. That was it - Thank you very much Salem!

    That was it - Thank you very much Salem!
  4. Lists of lists: last element of list overwritten by first element of another

    Hi,

    I have a global list that contains smaller lists of char arrays. I have an issue where when I’m reading back the inner lists the last element of one list seems to point to first element of the...
  5. List of lists - memory overwritten (I think)

    Hi all,

    I use a network simulator based around C. In one of my C files I have a global linked list (called obstacle_list saved in a header file) which contains smaller lists (not global). In...
  6. Replies
    7
    Views
    19,268

    Sorry I should have mentioned that the...

    Sorry I should have mentioned that the location_msg_ptr is set to NULL at the beginning of the code and when I get the result back from the function I check if it's NULL. If it is I assume no...
  7. Replies
    7
    Views
    19,268

    Check if two line segments intersect

    Hi,

    I've written some code below to check if two line segments intersect and if they do to tell me where. As input I have the (x,y) coordinates of both ends of each line. It appeared to be working...
  8. Lists and Char Pointers - Last element overwriting all others

    Hi,

    I have one list that contains multiple smaller lists. Each smaller list contains char arrays (well that where things get messy with pointers etc).

    So the problem is that that contents of...
  9. Replies
    6
    Views
    1,234

    Hi laserlight, grumpy Thanks for the replies -...

    Hi laserlight, grumpy

    Thanks for the replies - I was beginning to suspect as much. The problem now is finding the needle in the haystack :( ....guess I can write off a couple of hours
  10. Replies
    6
    Views
    1,234

    for loop bombing - very strange

    I am coding using a network simulator (OPNET).

    For some strange reason my for loop is causing the simulator to bomb (no error message which is why I can't solve the problem).

    I have tracked it...
  11. Thanks, I used memcpy() and it solved it.

    Thanks, I used memcpy() and it solved it.
  12. List Problem-Last entry overwriting all others

    Hi,

    In the below program I have a list of structs(chordRing.chordNodeIDList). When an entry is added to the end of a list it is somehow overwriting one particular parameter (chordEntry->node_id)...
  13. Actually from doing some more searching I think...

    Actually from doing some more searching I think there's no way to do this unless I know the highest number in my list (279799 in the list I gave above). If I know this I can scale it according to the...
  14. Do you mean that some of the numbers could end up...

    Do you mean that some of the numbers could end up the same? I need them to be unique......

    Is there any way to approach this using mod combined with something else?
  15. Scale back size of Numbers while maintaining proportion

    Hi,

    I am been given a list of numbers in a certain format [19700, 19900, 79400, 79600, 79800, 179300, 179500, 279799 etc]. There is no maximum value on this list.

    I need to scale back these...
  16. Replies
    5
    Views
    894

    Hi Salem, Thanks for that :o...Can't believe...

    Hi Salem,

    Thanks for that :o...Can't believe that was it - my brain clearly switched off from staring at the screen.
  17. Replies
    5
    Views
    894

    casting question

    Hi,

    This seems a ridiculously simple problem but I can't seem to figure out whats going wrong (maybe I'm looking at it too long):

    I'm trying to cast a double to an int but I keep getting an...
  18. Replies
    4
    Views
    1,505

    Hi Msh, Thats what I thought too. Originally I...

    Hi Msh,

    Thats what I thought too. Originally I figured I'd calculate the future position by knowing the old position and the speed and assuming it was moving in a straight line (Not sure if this...
  19. Replies
    4
    Views
    1,505

    Future Position of a Car

    Hi,

    Hopefully someone can steer me in the right direction (pardon the pun ;))

    I'm trying to code something from a paper to get the future position of a car i.e. p(I, Tc + delta t) the position...
  20. Replies
    2
    Views
    1,053

    Doh! the customary approach solved it - think my...

    Doh! the customary approach solved it - think my brain is switched off at this time of the night!

    Thanks for that.
  21. Replies
    2
    Views
    1,053

    Removing Items from a list - for loop

    Hi,

    I would like to loop through a list and removed any entries in the list that have expired i.e. are less than the current time. I am using a C based API specific to a particular simulator. How...
  22. Replies
    0
    Views
    934

    hash functions

    Hi,

    I need to code up a system that I need to compare to my own. In this system they use two types of hash function.

    The first hash function takes an IP address and hashes it to give x,y...
  23. Hi Salem, Thanks for the reply. I don't...

    Hi Salem,

    Thanks for the reply.

    I don't think I follow though. What is the significance of 65536 and when you say "hash" do you mean I should make use of the same library as I attached?
    ...
  24. Hash function - Object ID/IP address to 2D co-ordinates

    Hi,

    I'm trying to reverse engineer and extend code that I have inherited from another postgrad student (now gone).

    Basically he extended a SHA-1 library (see attached) so that an IP...
  25. Thanks Bernt! That was the problem - I've...

    Thanks Bernt!

    That was the problem - I've fixed it now.

    Cheers for that.
Results 1 to 25 of 29
Page 1 of 2 1 2