CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: highpriest

Page 1 of 2 1 2

Search: Search took 0.03 seconds.

  1. Replies
    5
    Views
    5,660

    Re: Enumerating all paths

    Mark all verticies with 1 and perform "Max Flow Min Cut" alg. The flow value is the num of all pathes.
  2. Re: In this case, is recursive faster than iterate?

    If I remember right (some years ago since I last wrote a assembler code), then the difference between iter. and rec. should be the below description.

    The iter. alg. is faster, if the value of i...
  3. Replies
    1
    Views
    1,832

    Re: problem in creating a hash table

    this
    for (int i = 0; i <= keylength; i++)
    sum += static_cast<int>(key[i]);

    expoits your integer range!

    use this:

    sum += ( static_cast<int>(key[i]) % HTsize);
  4. Replies
    6
    Views
    1,820

    Re: theory of computation problems

    Sorry, I am not sure at all, whether you have to find one i for all posible uvw combinations in the choosen z or to find at least on uvw combination with one i as used in the previous reply.
  5. Replies
    6
    Views
    1,820

    Re: theory of computation problems

    This is not a regular expression, because you can not save the amount of turns in the first expression ( (ab^*)^n ) in a finite automat needed for the second expression ( (a^*b)^n ).

    For each...
  6. Replies
    3
    Views
    1,755

    Deadlock!

    Hi,

    yes, the problem is DEADLOCK.

    If A holds a resource and wait for a resource, wich is hold by B and B wait for the resource, wich is hold by A, then you have a deadlock.

    Consider, A and...
  7. Replies
    8
    Views
    1,153

    Neagle Alg. is used for sending messages - I mean...

    Neagle Alg. is used for sending messages - I mean to remember. It waites a timeout value before it sends the (TCP) package to receiver. It should be nothing wrong with that. Your problem seems to be,...
  8. I suggested above to use MS Access Database for...

    I suggested above to use MS Access Database for this. It will be much easier to UPDATE, DELETE, INSERT new or existing towns. Also it is much easier to sort or filter the database. You can write some...
  9. This outcomes because you have likely not 20...

    This outcomes because you have likely not 20 Towns in your text file.
  10. Replies
    8
    Views
    1,153

    Read this from Microsoft Knowledge Base Article -...

    Read this from Microsoft Knowledge Base Article - 263823

    WinSock Recvfrom() Now Returns WSAECONNRESET Instead of Blocking or Timing Out.

    It relates to UDP (you are using TCP). Anyway maybe it...
  11. Replies
    1
    Views
    558

    One of the best books is from Andrew S. Tanenbaum...

    One of the best books is from Andrew S. Tanenbaum and Maarten van Steen. The other books from Tanenbaum is also highly recomended. Being a student for computer science this books was a bible for us....
  12. You have to add st = new StringTokenizer(line,...

    You have to add st = new StringTokenizer(line, ":") within the first for loop.



    StringTokenizer st ;

    int x = 0;
    for(int i = 0; i < CITIES; i++)
    {
    st =...
  13. Ahh, I forgot to tell you, that MS Text DB driver...

    Ahh, I forgot to tell you, that MS Text DB driver dont support UPDATE or DELETE statements. SELECT and INSERT are supported. If you want to be able to execute UPDATE or DELETE, you can convert the...
  14. Like you know, there is many roads to Rom. 1.)...

    Like you know, there is many roads to Rom.

    1.) Define a ODBC Microsoft Text Driver to the file containing Towns
    *) Controll Setting => ODBC => System-DSN
    *) Add MS Text Driver Database
    *) Name...
  15. Thread: toDegrees()

    by highpriest
    Replies
    4
    Views
    742

    PI in radians corresponds to 180 degree there...

    PI in radians corresponds to 180 degree
    there fore corresponds 30 degrees to (PI * 30)/180 = 0,52359877559829887307710723054658.... Like you can imagine a floating point representation of 30 degrees...
  16. Thread: toDegrees()

    by highpriest
    Replies
    4
    Views
    742

    Math.sin()...

    Math.sin() expects an angle in radians.
  17. Replies
    4
    Views
    536

    Create a BufferedImage...

    Create a BufferedImage and use RescaleOp
  18. Replies
    5
    Views
    836

    I suppose you have an Seat object for...

    I suppose you have an Seat object for representing a seat with row und seat number. Within this object you can override the equals method, inherited from Object class.



    public boolean...
  19. Thread: reversing?

    by highpriest
    Replies
    24
    Views
    2,664

    Did you ever write some code in java ? Here...

    Did you ever write some code in java ?

    Here the complete code, which you can compile and execute.



    class ReverseTest
    {
    public long reverse(long theNumToReverse)
    {
  20. Thread: reversing?

    by highpriest
    Replies
    24
    Views
    2,664

    This is the best solution like khp suggested...

    This is the best solution like khp suggested before.



    s = 545 ; r=0 ;
    while (s!=0) {
    r += s % 10;
    s /= 10;
    if (s!=0) r*=10 ;
    }
  21. Replies
    3
    Views
    3,742

    Do it your self vs. outsourcing

    I want to know what is better. Some says outsourcing is cost efficient and they enable you to concentrate on your main work (build cars not software). Other says the construcktor or consultant or...
  22. Thread: reversing?

    by highpriest
    Replies
    24
    Views
    2,664

    @rockmonkie872 what should be the reverse of...

    @rockmonkie872

    what should be the reverse of 500
    a) 5
    b) 005
  23. Thread: reversing?

    by highpriest
    Replies
    24
    Views
    2,664

    A Number Trick

    Select a three digit number in which the first and the last digit differ by at least two. Construct a second number by reversing the order of digits in the first. Form a third number by taking the...
  24. Replies
    6
    Views
    1,664

    In an older project i did implement my own...

    In an older project i did implement my own Stringtokinizer. I want it to be threadsafe.

    stringtokeniterator.h
    ================
    #ifndef __TOKENITERATOR_H__
    #define __TOKENITERATOR_H__


    /**
    ...
  25. Replies
    1
    Views
    1,413

    I would implement this by mixing multiplexing...

    I would implement this by mixing multiplexing method with pipelining .

    This works like this (send is async and receive/get is sync => blocking):

    create one or more worker threads that waits for...
Results 1 to 25 of 29
Page 1 of 2 1 2





Click Here to Expand Forum to Full Width

Featured