Search Results

Search found 11 results on 1 pages for 'catskul'.

Page 1/1 | 1 

  • Accidentally moved FUSE mounted mount point, not cannot unmount. Any option besides reboot?

    - by Catskul
    I mounted a disk image using a few different FUSE modules and then subsequently renamed the parent directory. The mounts have disappeared from the mtab and now the OS refuses to unmount them. fusermount -u mnt returns: fusermount: entry for /home/catskul/foo/mnt not found in /etc/mtab sudo fusermount -u mnt returns: fusermount: failed to unmount /home/catskul/foo/mnt: Device or resource busy sudo fuser -a mnt returns: Cannot stat file /proc/986/fd/55: Permission denied mnt:

    Read the article

  • Possible to mount an ext4 partition image via FUSE?

    - by Catskul
    I'm attempting to mount an ext4 partition image in userspace. (no sudo, no special config/permissions modification to /dev/loop0 or /etc/fstab etc). So I'm hoping FUSE will come to the rescue. However it seems that each file system mounted through the FUSE system needs to have a special FUSE driver, and I've not been able to find a linux read-write ext4 FUSE driver for linux. Is there a way to mount ext4 images via FUSE (with write permission)?

    Read the article

  • Does QEMU's performance (still) lag VirtualBox's and is there a way to improve it without kvm?

    - by Catskul
    I've noticed several articles that have claimed that QEMU is slower than VirtualBox (without hardware assistance) but several are years old, and the newest seemed to be from last year. Is it true that QEMU is slower than VirtualBox? If so why? Are there any tricks to close the performance gap? Some of my host systems do not have virtualization support so I'm especially interested in performance tips that work without the kernel module.

    Read the article

  • Is there a way to use VirtualBox without using it's resource registry?

    - by Catskul
    Summary VirtualBox seems to want everything to be "registered" which makes it much more annoying to work with on the command line. I'm attempting to create an automated script which will create, move, start, stop, and destroy virtual machines and virtual disks. Requiring registration will complicate the task for the following reasons. leaves state information around that can cause unpredicted edgecases causing scripts to fail. creates potential name space collisions for multiple process creating VMs with the same name moving/copying resources on the same machine is more complicated because references in the registry need to be updated copying resources (disk + vm combination) to another machine require reconfiguration once they reach their target machine, and require the transfer of extra meta data to do the reconfiguration. If something unexpectedly fails, and an unregister thus fails to happen, left over configuration information can cause problems in subsequent runs. Use Case My specific use case is for a continuous integration server which creates and destroys VMs and Disk images potentially with the same name, and would require more logic to deal with the registry's statefulness. Imaginary Example It seems that I should just be able to for example (using some imaginary and/or incorrect commands): mkdir foobar customdiskimg_script ./foo/foo.vdi vboxmanage createvm --name "foo" --ostype Linux --basefolder ./foo/foo.xml vboxmanage storagectl ./foo/foo.xml --name foo --add ide vboxmanage storageattach --storagectl foo --medium ./foo/foo.vdi ./foo/foo.xml vboxmanage startvm ./foo/foo.xml TLDR Is there a way to use virtualbox without "registering" harddisks and VMs?

    Read the article

  • What's correct way to remove a boost::shared_ptr from a list?

    - by Catskul
    I have a std::list of boost::shared_ptr<T> and I want to remove an item from it but I only have a pointer of type T* which matches one of the items in the list. However I cant use myList.remove( tPtr ) I'm guessing because shared_ptr does not implement == for its template argument type. My immediate thought was to try myList.remove( shared_ptr<T>(tPtr) ) which is syntactically correct but it will crash from a double delete since the temporary shared_ptr has a separate use_count. std::list< boost::shared_ptr<T> > myList; T* tThisPtr = new T(); // This is wrong; only done for example code. // stand-in for actual code in T using // T's actual "this" pointer from within T { boost::shared_ptr<T> toAdd( tThisPtr ); // typically would be new T() myList.push_back( toAdd ); } { //T has pointer to myList so that upon a certain action, // it will remove itself romt the list //myList.remove( tThisPtr); //doesn't compile myList.remove( boost::shared_ptr<T>(tThisPtr) ); // compiles, but causes // double delete } The only options I see remaining are to use std::find with a custom compare, or to loop through the list brute force and find it myself, but it seems there should be a better way. Am I missing something obvious, or is this just too non-standard a use to be doing a remove the clean/normal way?

    Read the article

  • Is it possible to use boost::bind to effectively concatenate functions?

    - by Catskul
    Assume that I have a boost::function of with an arbitrary signature called type CallbackType. Is it possible to use boost::bind to compose a function that takes the same arguments as the CallbackType but calls the two functors in succession? Hypothetical example using a magic template: Template<typename CallbackType> class MyClass { public: CallbackType doBoth; MyClass( CallbackType callback ) { doBoth = bind( magic<CallbackType>, protect( bind(&MyClass::alert, this) ), protect( callback ) ); } void alert() { cout << "It has been called\n"; } }; void doIt( int a, int b, int c) { cout << "Doing it!" << a << b << c << "\n"; } int main() { typedef boost::function<void (int, int, int)> CallbackType; MyClass<CallbackType> object( boost::bind(doIt) ); object.doBoth(); return 0; }

    Read the article

  • Possible: Set Operations on Disparate Maps with Same Key Type?

    - by Catskul
    Let's say I have two maps: typedef int Id; std::map<Id, std::string> idToStringMap; std::map<Id, double> idToDoubleMap; And let's say I would like to do a set operation on the keys of the two maps. Is there an easier way to do this than to create a custom "inserter" iterator? such that I could do something like: std::set<Id> resultSet; set_difference( idToStringMap.begin(), idToStringMap.end(), idToDoubleMap.begin(), idToDoubleMap.end(), resultSet.begin() ); My experimentation results imply that it will be necessary to create a custom inserter and perhaps a custom key comparer to do this, but I want for some insight/shortcut before doing so.

    Read the article

  • How do you resolve the common naming collision between type and object?

    - by Catskul
    Since the standard c# convention is to capitalize the first letter of public properties, the old c++ convention of initial capital for type names, and initial lowercase for non-type names does not prevent the classic name collision where the most obvious object name matches the type name: class FooManager { public BarManager BarManager { get; set; } // Feels very wrong. // Recommended naming convention? public int DoIt() { // 1st and 2nd Bar Manager are different symbols return BarManager.Blarb + BarManager.StaticBlarb; } } class BarManager { public int Blarb { get; set; } public static int StaticBlarb { get; set; } } It seems to compile, but feels so wrong. Is there a recommend naming convention to avoid this?

    Read the article

  • How do you resolve the common collsision between type name and object name?

    - by Catskul
    Since the convention is to capitalize the first letter of public properties, the old c++ convention of initial capital for type names, and initial lowercase for non-type names does not prevent the classic name collision class FooManager { public BarManager BarManager { get; set; } // Feels very wrong. // Recommended naming convention? public int DoIt() { return Foo.Blarb + Foo.StaticBlarb; // 1st and 2nd Foo are two // different symbols } } class BarManager { public int Blarb { get; set; } public static int StaticBlarb { get; set; } } It seems to compile, but feels so wrong. Is there a recommend naming convention to avoid this?

    Read the article

  • Where should the line between property and method be?

    - by Catskul
    For many situations it is obvious whether something should be a property or a method however there are items that might be considered ambiguous. Obvious Properties: "name" "length" Obvious Methods: "SendMessage" "Print" Ambiguous: "Valid" / "IsValid" / "Validate" "InBounds" / "IsInBounds" / "CheckBounds" "AverageChildValue" / "CalcAverageChildValue" "ColorSaturation" / "SetColorSaturation" I suppose I would lean towards methods for the ambiguous, but does anyone know of a rule or convention that helps decide this? E.g. should all properties be O(1)? Should a property not be able to change other data (ColorSaturation might change R,G,B values)? Should it not be a property if there is calculation or aggregation? Just from an academic perspective, (and not because I think it's a good idea) is there a reason not to go crazy with properties and just make everything that is an interrogation of the class without taking an argument, and everything that can be changed about the class with a single argument and cant fail, a property?

    Read the article

1