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

Search:

Type: Posts; User: 2kaud

Page 1 of 80 1 2 3 4

Search: Search took 0.21 seconds.

  1. Re: [RESOLVED] Filter a txt file based on a grid of data

    What difference in timings are you getting between the VB and the C++ versions? I'd be interested - especially for the larger files - as you mentioned an hour for VB in some cases.
  2. Re: Filter a txt file based on a grid of data

    This is the C++ converted VB code for the level_4_60.xlsm file. For the test data it produces no output as expected.



    #import "c:\\Program Files (x86)\\Common Files\\microsoft...
  3. Re: Filter a txt file based on a grid of data

    The VB code in the given .pdf file in post #23 is not the same VB code as given in the attachment in post #1. There are 2 differences. For the VB code in the .pdf file in post #23, the converted C++...
  4. Re: Filter a txt file based on a grid of data

    Using your level_3_30.xlsm file (which has format of level_1) with the latest ToPurgeFile.txt (both from the zip file in post #21) and the level 1 code from post #16, I get an output file of 5.75kb...
  5. Thread: simple rendering

    by 2kaud
    Replies
    3
    Views
    181

    Re: simple rendering

    If you are new to both programming and C++ in particular, then you have a quite steep learning curve in front of you!

    For an on-line resource to learning C++, have a look at...
  6. Re: Filter a txt file based on a grid of data

    Try this for the groups_of_30 VB. On my system it produces the expected output as per your attachment in post #19.



    import "c:\\Program Files (x86)\\Common Files\\microsoft...
  7. Re: Filter a txt file based on a grid of data

    On my system, processing the 74.5 Mb (3,999,564 lines) took 30 seconds and produced the output file of 375,026 lines (6.63Mb).

    As you can compile/run the C++ code in post #16, I'll now 'convert'...
  8. Re: Filter a txt file based on a grid of data

    Try this C++ code for the Only_Zero VB filter. You may need to change the file names to suit your system. For me, it produces the required output file of the expected 44 lines. Let me know how it...
  9. Re: Filter a txt file based on a grid of data

    This is some 'proof of concept' C++ code. It should display the values in row 10 of the level_1.xlsm file. I used MS VS2019. You may need to change the file names/locations in the #import lines 1, 6...
  10. Re: Filter a txt file based on a grid of data

    Yes - but can you provide the file with the expected 44 lines so that I can check the code is working properly.
  11. Re: Filter a txt file based on a grid of data

    Ok. I can now read the data in the .xlsm files in post #3 in a C++ program.

    What is level_1.xlsm and level_2.xlsm? Which one is supposed to be used for the filter? Given this .xlsm file and the...
  12. Re: Filter a txt file based on a grid of data

    Update. I've found some C++ code that enables data from an .xls spreadsheet to be read. Can you send me a copy of the .xls spreadsheet to use as a filter and I'll see if I can easily obtain values...
  13. Re: Filter a txt file based on a grid of data

    A different approach to this problem would be to save the spreadsheet with the required filtering data as a separate csv file (text filter file). Then you have the requirement of producing a text...
  14. Re: Filter a txt file based on a grid of data

    You have a populated spreadsheet an example as shown in the image in post #5. You have an input text file containing lines of numbers and you want to filter these lines to produce an output file...
  15. Replies
    6
    Views
    253

    Re: upperbounds issue with c++ from a csv file

    Which is my code in post #4. Are we dealing in polar co-ordinates here? So given that the vector now has these 49 polar? values, what is the next step? How are converting these polar? co-ordinates...
  16. Replies
    6
    Views
    253

    Re: upperbounds issue with c++ from a csv file

    I don't understand what this C++ code has to do with the VB code in post #1 :confused:

    For a simple C++ conversion of the VB code consider:



    #include <fstream>
    #include <vector>
    #include...
  17. Thread: Stop a thread

    by 2kaud
    Replies
    19
    Views
    468

    Re: Stop a thread

    Another way to know if all the threads have terminated is to determine how many running there are and if > 1 then there are other threads running. Consider:



    #include <windows.h>
    #include...
  18. Replies
    6
    Views
    253

    Re: upperbounds issue with c++ from a csv file

    I don't know VB but it looks like you are trying to open a file, read a csv line, parse it into 3 values, store values 1 & 2 into a container indexed on value 0 and repeat for all lines in the file?...
  19. Re: Filter a txt file based on a grid of data

    If you can specify the requirement for the output file based upon the input file without any reference to Excel, then I'll see what I can do to provide a C++ program that takes an input file,...
  20. Re: Filter a txt file based on a grid of data

    If you want to apply some filtering to an input text file to produce an output text file in a required format that can then be imported into Excel then that isn't too difficult. If you provide...
  21. Replies
    3
    Views
    296

    Re: How do I write a recursive golden ratio?

    If you just need the golden ratio then it can be calculated easily as

    (1 + sqrt(5)) / 2

    See https://www.mathsisfun.com/numbers/golden-ratio.html
  22. Replies
    57
    Views
    13,637

    Re: I need Taskbar APIs

    Why can't you use SendMessageTimeOut() to reload explorer.exe as stated in the referenced post above? Changing those settings only takes effect after a restart of explorer.exe.
  23. Thread: Stop a thread

    by 2kaud
    Replies
    19
    Views
    468

    Re: Stop a thread

    If GetFileAvailability() is not doing as expected (eg not returning etc), then it's likely that there is a problem with that function. Have you stepped through that function with the debugger to see...
  24. Thread: Stop a thread

    by 2kaud
    Replies
    19
    Views
    468

    Re: Stop a thread

    How is the thread stopped? If it is terminated elsewhere, then the heap memory is not automatically freed. Threads need to terminate themselves. If it is required that one thread terminates another...
  25. Re: Why would modifying a vector member of self-type cause this program to run infini

    I agree with Victor's post #3 re names. Even formatted, this code is very hard to read and understand.

    If within a struct/class type you want to use that type then there are issues around...
Results 1 to 25 of 2000
Page 1 of 80 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)