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

Search:

Type: Posts; User: mce

Page 1 of 5 1 2 3 4

Search: Search took 0.03 seconds.

  1. Thread: template function

    by mce
    Replies
    3
    Views
    224

    Re: template function

    hi

    I declared a template function in my .h file, but it doesn't seem to be able to take virtual.



    template <typename K, typename V> virtual V GetWithDef(const std::map <K,V> & m, const K &...
  2. Thread: auto_ptr

    by mce
    Replies
    1
    Views
    177

    auto_ptr

    Hi,

    I have a few questions regarding this auto_ptr

    1) I should only use auto_ptr within a function??

    2) Can i use auto_ptr<int> or auto_ptr<SomeClass> in a class?
    example:
  3. Thread: template function

    by mce
    Replies
    3
    Views
    224

    template function

    hi,

    I just want to be sure..

    I have made a template function as follow;



    template<typename V>
    ProcessValue(const & V)
  4. Replies
    2
    Views
    183

    Re: copy part of vector 1 to vector 2

    TQ so much, don know why my mind just got stuck when i was shown the example of copy using begin() and end()..... sighhhhhhhhh
  5. Replies
    2
    Views
    183

    copy part of vector 1 to vector 2

    Hi,

    I am trying to copy vector to vector as follow:



    std::vector<unsigned char> vec1;

    //insert some values into vec1
  6. Re: How to insert and retrive an object without default ctor from container?

    i tried the following:



    mymap["test"]=mycppobj;

    std::map<std::string,CPP_OBJECT>::iterator it=mymap.find("test");
    std::pair<std::string,CPP_OBJECT> pair=*it;
    CPP_OBJECT* t=pair.second();...
  7. How to insert and retrive an object without default ctor from container?

    Hi,

    I have a third party class object, CPP_OBJECT that i save in std container.
    for example; i want to do the following.

    std::map<std::string, CPP_OBJECT> mymap;
    mymap["test"]= myobj;
    ...
  8. Replies
    8
    Views
    518

    Re: Multithread writing data

    Hi rliq,

    Thanks for that.
    I am too using the asynchronous threads to do the updates and enumerating.
    But on the data update part and enumerating part,

    a closer simulation is to update the...
  9. Replies
    8
    Views
    518

    Re: Multithread writing data

    Hi rliq,

    Currently it will be 10 threads updating (no removing or deleting), one thread enumerating the dictionary every 10ms to get the latest data updates.
  10. Replies
    8
    Views
    518

    Re: Multithread writing data

    Hi rliq,

    Thanks for your response.

    What if i run the database in memory, or i use a datatable in memory? I have concern about Dictionary, i.e if i have 10 threads, and using lock with the...
  11. Replies
    8
    Views
    518

    Multithread writing data

    Hi,

    I have many threads which update simple "real time" data, format as in a database. for example, i have 10 threads, updating data at every 20ms to 30ms. The data is just a string or double...
  12. Replies
    0
    Views
    227

    control Docking problem

    Hi

    On my winform, i have just 2 groupbox and a panel and a button.
    when i set docking properties in my designer to the panel, be it dock top, left or bottom, there is always a big gap to the left...
  13. Re: Extract a portion of sorted dictionary into an array

    Thanks fcronin!

    Anyone else has a solution, probably using the sorteddictionary or sortedlist class? I am keen to know if there is a soultion without LINQ...
  14. Extract a portion of sorted dictionary into an array

    Hi,

    How can extract a portion of a large dictionary<DateTime, string>, where DateTime is sorted? For example, i want to extarct all strings occur between 2010/10/01 to 2011/10/01 into an array,...
  15. Thread: Database update

    by mce
    Replies
    8
    Views
    580

    Re: Database update

    I still have problem on the database update, it looks like the sql update statement is wrong somewhere. The database is updated if i used a hardcoded statement as follow.




    ...
  16. Thread: Database update

    by mce
    Replies
    8
    Views
    580

    Re: Database update

    I am now trying the sqltransaction and i just couldn't get my code to work, i.e write to the database.

    Could you correct me where i am wrong?

    This is what i have inside my update thread.


    ...
  17. Thread: Database update

    by mce
    Replies
    8
    Views
    580

    Re: Database update

    I need to update/write to the database a few hundreads records very frequently and continuously from a thread. Since i have a few hundreds records to update, i just want to open connection to the...
  18. Replies
    2
    Views
    905

    Re: Writing to Database

    Btw, i am using firebird database, but i guess any database will be the same method. The modified data can be seen from the dataset, but it just doesn't get written into database after accept...
  19. Replies
    2
    Views
    905

    Writing to Database

    Hi,

    I load a table data from my database using dataAdapter.Fill(dataset) method, and then using datarow to edit the records.

    I want to use datarow.BeginEdit() for every row, and finally call...
  20. Replies
    0
    Views
    343

    UdpClient socket issues, pls help!

    Hi,

    I am creating an application that talks to 2 other applications, A and B. So I am creating a 2 udp sockets bind to two different ports, udpClient1 socket receive from port 12345 from...
  21. Replies
    2
    Views
    462

    return this instance through interface

    Hi,

    i want to return the current instance to my interface in the implementation class. Anything wrong with the following? in terms of design or ..?





    public interface IMyInterface
    {
  22. Thread: UdpClient

    by mce
    Replies
    1
    Views
    372

    UdpClient

    Currently i am creating udpClient by binding it to a specific local port.



    udp = new UdpClient(LocalPort1);



    I can receive data sent to LocalPort1 by
  23. Replies
    2
    Views
    2,810

    Re: Swapping controls in TableLayoutPanel

    anyone?


    I have the following piece of codes now; but i just don't understand why it doesn't work!!!

    Could anyone point out why it doesn't work correctly? The cell position i got is wrong...
  24. Replies
    2
    Views
    2,810

    Swapping controls in TableLayoutPanel

    Hi,

    Basically I want to be able to drag drop controls inside the table layout panel where the control in the cell where i drop to swap position with the control where i drag from. I already...
  25. Replies
    2
    Views
    528

    what is the double value of 0.1+0.1+0.1?

    in CSharp,



    double d = 0.10 + 0.10 + 0.10;
    //d=0.30000000000000004;
Results 1 to 25 of 120
Page 1 of 5 1 2 3 4



HTML5 Development Center

Click Here to Expand Forum to Full Width