I know Luc. But I have don't have other choice. I can't change the representation of data because it is sent further for some processing.
AksharRoop
Posts
-
My sorting algorithm -
My sorting algorithmI have a list of values in single dimensional vector/array as follow:
{([point0, value0], [point1, value1], ... , [pointx, valuex]), ([pointx+1, valuex+1], [pointx+2, valuex+2], ... , [pointy, valuey]), ([pointy+1, valuey+1], [pointy+2, valuey+2], ... , [pointz, valuez])}
[at first it may look like weird how this is single dimentional array; but yes it is ]
{point0,value0,point1,value1,...,pointx,valuex}
Here i know how values are structured in an input array. I just need to implement best sorting technique for this. Requirement is to sort each block based on point value(i.e. sort point0,value0 to pointx,valuex). I have information about number of elements in each block (which will be consistent for all blocks). I can simply write something like:
// blockSize is given // totalBlocks size is given // setOfValues is given (to be sorted)
for(int blockIndex = 0 ; blockIndex < totalBlocks; ++blockIndex) { for(int i = blockSize * blockIndex; i < blockSize*(blockIndex + 1); i = i + 2) { for(int j = blockSize * blockIndex; j < blockSize*(blockIndex + 1); j = j + 2) { if (setOfValues[i] < setOfValues[j]) { int temp = setOfValues[i]; setOfValues[i] = setOfValues[j]; setOfValues[j] = temp; temp = setOfValues[i+1]; setOfValues[i+1] = setOfValues[j+1]; setOfValues[j+1] = temp; } } } }
Time required for this algorithm is very huge: O(totalBlocks * blockSize^2) I am thinking of writing this in better way. Any help would be great! Thanks, AksharRoop -
Push like button on ribbon using CMFCRibbonButtonI see no way to create push like button on ribbon. I am trying to simulate same using CMFCRibbonButton. How to set the button state as highlighted/clicked/pressed in ON_COMMAND. AksharRoop
-
The new Office2007 Ribbonbar - Are there pushlike checkboxes for it?I would like to simulate the same, can you please help?
-
ostringstream to tchar*Hiya, It would be helpful if someone tell me how I could convert ostringstream to tchar* such that it will work in both ansi and unicode compilation. currently i have done like:
std::ostringstream strn;
strn <<"Just do it!";
const TCHAR* tata = static_cast< LPCTSTR >(strn.str().c_str());But this does not seems to work in both the cases.
-
How to know if unmanaged object is not in memory?I hope I atleast know this!! The object is not null. It holds a pointer to an object. so here it is a 'dangling ptr' kind of situation.
-
How to know if unmanaged object is not in memory?Problem Statement: How to know if unmanaged com object is deleted from memory. Problem Description: I have unmanaged object instance in one class. When closing application this object is is destructed from other part of code. And it also comes to point where object is member of class to do some final clear stuff. When it tried to access this com object (which has already been deleted from memory) it throws memory access violation error. Is there any way to know if this object still exist? Thanks, AksharRoop
-
How to send keyDoes this works for WPF window as well? Because when i tried using this it gives error that your application is not set to handle window messages? I cannot change structure of application because drag-drop framework is designed such that there are different classes, so when item is moved from Window, it is handled by framework class and once processed I want framework to send key.
-
How to send keyHi All, I have developed a simple WPF application, where I want to send key (i.e. F5) so that all controls gets filled with updated data from DB. I have already written code for this and it works fine when i press F5. What i want to do now is that I want some way to send F5 key through code so that after doing some action it does F5 through code. [I cannot directly call the method which performs repaint task because I am in another class] Any help? Thanks, AksharRoop
-
An issue with the file name SerialPortSettings.xmlDon't know how your files are organized. There should not be any problem with SerialPortSettings.xml.
-
How to check if particular class is user defined?Thanks but I need better solution if any .. :)
-
How to check if particular class is user defined?Hi All, I am writing an application in which I need to put check if a class is user defined or built in (C# or .Net). Can someone help me with this? Thanks, AksharRoop
-
Invoke WPF window from VBAI am altering my existing application developed using MS Access + VBA. I have created new window (wpf) which handles some tasks. I want this window to be loaded on button click from old MS Access application. Is it possible to do this? Sorry if posted at wrong forum.
-
New to WPF - Would this be easy to implement?Thanks a lot Mark.
-
New to WPF - Would this be easy to implement?Any good sample that would help me with this?
-
New to WPF - Would this be easy to implement?Hi All, I am just starting with WPF to implement rich GUI application. I have design in my mind and would like you to give suggestion to make it better.
--------------------------------------------------- dropDown1 dropdown2 dropdown3 ----------........---------........--------- ..........|......|.........|......|.........| ..........|......|.........|......|.........| ..........|......|container|......|container| Tree view.|......|..with...|......|..with...| ..........|......|.multiple|......|.multiple| ..........|......|list view|......|list view| ..........|......|.........|......|.........| ..........|......|.........|......|.........| ----------.......-----------......----------- ---------------------------------------------------
Above is the design i would like to implement. How it should work? - a user will select an option from dropDown1 and treeview will be filled with hierarchy of active, pending, closed guests. - When user will select an option from dropDown2/dropDown3 it will fill respective containers with list views (no of list views will be decided at run time by retrieving count from DB so there is requirement that container should pop up scrollbars if listviews crosses the bounds) - Now user will move (drag and drop) guest from treeview to list view. This is how application would work. I need your suggestion if this would be easy to implement in WPF. Also share your view on this. Thanks, AksharRoop
-
Calling Overloaded COM method in VB6Is it the same case with calling COM method from VBA? Any documentation that i could find for this? I did not get anything from search engine...
-
Calling Overloaded COM method in VB6Hope i have posted the question in correct forum...
-
Calling Overloaded COM method in VB6Hi All, I have interface defined in C# public interface ITABlock { public void Get(string id); public void Get(ITABlockElement obj); } This is implemented as: public class TABlock : ITABlock { // implementation of ITABlock methods } Now these methods are exposed to VB as Get and Get_2 so when calling Get_2 it gives an error: Object doesn't support this property or method Any solution for this. Thanks, AksharRoop
-
Configuration file for data inputs.Hi All, I wrote an application that reads web page contents and send to specified email addresses. I want to make this configurable; i mean a user should be able to set/change at anytime the to,from,subject etc. details. I am new to C# but i know that app.config is one way to do this, but what i have read in forums that people generally use it only for installation configs. Is there any other way where a user would be able to provide input in key-value format? Thanks, AksharRoop