I have been working on a project in my personal time that has nothing at all to do with my main job. I work on it after work, on the trolley to work, and on the trolley from work. I store all my source code in my own personal repository on my personal server in my apartment.
While at work, I use the same computer which I purchased to do...
Consider the following class structure:
class Filter
{
virtual void filter() = 0;
virtual ~Filter() { }
};
class FilterChain : public Filter
{
FilterChain(collection<Filter*> filters)
{
// copies "filters" to some internal list
// (the pointers are copied, not the filters themselves)
}
~Filter...
Gentlement,
following situation. There are files in a network share to which even Administrators have no permissions, permissions are set for two individual users only. In the process of an operation to detect and fix such issues (because this is not desired) I need to add access to the Administrators.
In Windows Explorer that's easy....
Hi all.
I have a PHP script that I need to run as root from the command line.
After the script completes some critical operations (that require root access) I would like to change the owner of the process to 'nobody'.
Is that possible with PHP? How can I do it?
...
Hi all,
I have a question regarding shared_ptrs and ownership in C++:
I have a bunch of objects created on the heap. Each one has a container which holds pointers to some of these objects, and sometimes, even a pointer to the same object the container belongs to. Since I read about the risks of using shared_ptr under such circumstances...
I have a program that is highly multi-threaded and it contains an intrusive linked list of objects. I need to pass off the objects in this list to several threads, but only 1 thread will ever own the object at a time, meaning that I don't need this object or the pointer to it be shared.
I wanted to create an intrusive list with a uniqu...
If I use a container of shared_ptrs and explicitely allow access to its elements, should I return shared_ptrs or raw pointers if I intend the container to be the one responsible for "cleaning up"?
class Container
{
private:
std:vector<shared_ptr<Foo> > foo_ptrs;
public:
shared_ptr<Foo> operator[](std::size_t index) const {}; //...