Search Results

Search found 6 results on 1 pages for 'salamiarmi'.

Page 1/1 | 1 

  • Windows 7 - Move open programs more freely on the taskbar

    - by SalamiArmi
    When I used Windows XP last year, I had a program called Taskix which let me move the tabs in the taskbar around for programs in any order I wanted. Now that I have Windows 7, a similar function comes built into the operating system - however, it isn't as flexible as Taskix was in XP. Theoretical situation: 1. Open a folder named #1 2. In folder #1, open an instance of a program 3. Open a folder named #2 4. In folder #2, open an instance of the same program that was opened in step 2. After doing this, I will have (in order, on the taskbar) 2 folders open and 2 instances of the programs open. My question really is: Is there any way to fight this automatic ordering of tabs on the taskbar? A registry hack or something would be best, but if there's a third party program out there, that would be nice to know about. Thanks!

    Read the article

  • Red-Black trees - Erasing a node with two non-leaf children

    - by SalamiArmi
    Hi all, I've been implementing my own version of a red-black tree, mostly basing my algorithms from Wikipedia (http://en.wikipedia.org/wiki/Red-black_tree). Its fairly concise for the most part, but there's one part that I would like clarification on. When erasing a node from the tree that has 2 non-leaf (non-NULL) children, it says to move either side's children into the deletable node, and remove that child. I'm a little confused as to which side to remove from, based on that. Do I pick the side randomly, do I alternate betweek sides, or do I stick to the same side for every future deletion?

    Read the article

  • Search algorithm for a sorted double linked list

    - by SalamiArmi
    As a learning excercise, I've just had an attempt at implementing my own 'merge sort' algorithm. I did this on an std::list, which apparently already had the functions sort() and merge() built in. However, I'm planning on moving this over to a linked list of my own making, so the implementation is not particuarly important. The problem lies with the fact that a std::list doesnt have facilities for accessing random nodes, only accessing the front/back and stepping through. I was originally planning on somehow performing a simple binary search through this list, and finding my answer in a few steps. The fact that there are already built in functions in an std::list for performing these kinds of ordering leads me to believe that there is an equally easy way to access the list in the way I want. Anyway, thanks for your help in advance!

    Read the article

  • Debugging strategy to find the cause of bad_alloc

    - by SalamiArmi
    I have a fairly serious bug in my program - occasional calls to new() throw a bad_alloc. From the documentation I can find on bad_alloc, it seems to be thrown for these reasons: When the computer runs out of memory (which definitely isn't happening, I have 4GB of RAM, program throws bad_alloc when using less than 5MB (checked in taskmanager) with nothing serious running in the background). If the memory becomes too fragmented to allocate new blocks (which, again, is unlikely - the largest sized block I ever allocate would be about 1KB, and that doesn't get done more than 100 times before the crash occurs). Based on these descriptions, I don't really have anywhere in which a bad_alloc could be thrown. However, the application I am running runs more than one thread, which could possibly be contributing to the problem. By testing all of the objects on a single thread, everything seems to be working smoothly. The only other thing that I can think of that is going on here could be some kind of race-condition caused by calling new() in more than one place at the same time, but I've tried adding mutexes to prevent that behaviour to no effect. Because the program is several hundred lines and I have no idea where the problem actually lies, I'm not sure of what, if any, code snippets to post. Instead, I was wondering if there were any tools that will help me test for this kind of thing, or if there are any general strategies that can help me with this problem. I'm using Microsoft Visual Studio 2008, with Poco for threading.

    Read the article

  • bad_alloc occuring when allocating small structs

    - by SalamiArmi
    A bad_alloc has started showing up in some code which looks perfectly valid to me and has worked very well in the past. The bad alloc only occurs once every 50-3000 iterations of the code, which is also confusing. The code itself is from a singly linked list, simply adding a new element to the queue: template<typename T> struct container { inline container() : next(0) {} container *next; T data; }; void push(const T &data) { container<T> *newQueueMember = new container<T>; //... unrelated to crash } Where T is: struct test { int m[256]; }; Changing the size of the array allocated array to anything but very small values (1-8 ints) still results in a bad_alloc occasionally. A few extra notes about my program: - I used Poco::ThreadPool to thread my program. I've only recently added this functionality, before I had it running with Win32 threads. However, only the main thread ever calls push(). - I am also occasionally getting other crashes which could be related. However, when I try to debug with visual studio 2008, I can't navigate back to the call stack, or the crash happens deep within new(). Thanks in advance.

    Read the article

  • Forcing a templated object to construct from a pointer

    - by SalamiArmi
    I have a fictional class: template<typename T> class demonstration { public: demonstration(){} ... T *m_data; } At some point in the program's execution, I want to set m_data to a big block of allocated memory and construct an object T there. At the moment, I've been using this code: void construct() { *m_data = T(); } Which I've now realised is probably not the best idea... wont work under certain cirumstances, if T has a private assignment operator for example. Is there a normal/better way to do what I'm attempting here?

    Read the article

1