Does std::move result in slicing?
For example, in unique_ptr<Derived> = new deriv; std::vector<unique_ptr<Base>>.push_back(std::move(deriv)); will deriv be sliced to type unique_ptr<Base>? ...
For example, in unique_ptr<Derived> = new deriv; std::vector<unique_ptr<Base>>.push_back(std::move(deriv)); will deriv be sliced to type unique_ptr<Base>? ...
I am using Dynamic dictionary in C#. The problem which I am facing , is the usage of TryGetMember behavior which i am overriding in dynamic ditionary class. here's the code of dynamic dictionary. class DynamicDictionary<TValue> : DynamicObject { private IDictionary<string, TValue> m_dictionary; public DynamicDictionary(IDicti...
g++ -std=gnu++0x main.cpp In file included from main.cpp:6:0: CustArray.h: In constructor 'CustArray::CustArray()': CustArray.h:26:32: error: 'class Info' has no member named 'someInfo' make: *** [all] Error 1 /* * Info.h * */ #ifndef INFO_H_ #define INFO_H_ class Info { friend class CustArray; }; #endif /* INFO_H_ */ /* * ...
Hello, I have a php script on my site (users_online.php) that shows how many people are connected to my server whenever the script is executed and I would like to display and update this information on my front page using javascript / ajax without refreshing the page is this possible ? Thanks, Kelly ...
So I want my users to manage the site content themselves. For example when a customer/visitor is on the site, they see the content (each page content or paragraph stored in a database). If an employee is on the site, they should be able to login (or LDAP integrate) and for every <p> or <div> they should see a little edit icon next to it...
I have a somewhat complex custom user control, created in C# .NET, which is essentially a tree structure. The control , ctlGroup, contains a list of fields (which are also custom user controls - ctlFields) and a list of child groups. The datalist containing the child groups creates new instances of the same ctlGroup control, because each...
If I create buttons dynamically in a loop, for(i=0; i < size; i++) { Button button = new Button(this); myLayout.addView(button); } How can I reference each of these buttons at a later time? So, for eg, if I wanted to change the text on a few buttons, how would I do that? Thanks Chris ...
Hi, Is there anything called dynamic partitioning in SQL server? If so how can i implement it? ...
I have developed a generic TreeList control in C# which combines a TreeView with a ListView to obtain a multi-column TreeView. I would like to use a TreeView derived class for the TreeView portion of the control, but keep the TreeListView control generic. In my TreeListView I have a member variable: protected TreeView treeView; and t...
class Project(models.Model): slug = models.SlugField(max_length=100) main_file = models.FilePathField(path="/home/mn/myfiles/%s" % slug) This code doesn't work, just illustrating what I'd like to do. I want to fill in FilePathField when object is accessed (ie. when it is updated in django admin, not when it's created). Is the...
I have a program which embeds both python2 and python3 interpreters. The libpython shared libraries are dlopen()ed by the respective commands which provide access to the interpreters and each interpreter maintains its own state. This all works just fine if the user only uses pure python modules or builtins. Trying to load a C extensio...
I've wrestled with Drupal for months... it just doesn't really have a very fluid way to deal with dynamic tagging and calls. For instance... I need to be able to allow the user to create/manage tags, anytime they want, on their profile that do the following things: List the User in relative searches Contribute to a tag-cloud Return it...
<html> <head> <style type="text/css"> body { background-color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 20px; text-align: center; color: #FFFFFF; } </style> <script type="text/javascript" src="jquery-1.4.js"></script> <script type="text/javascript"> function sleep(ms) ...
OK, So I want to set the background to a transparent image and change the color of the background on an event firing. I can set the background image to a resource in an xml file, and I can also change the color of a TextView on event firing, but for some reason I can't do both at the same time. Do I need to create a drawable or something...
I am creating an animated drawable and then adding it to a FrameLayout. The variable is created as a class field and then, each new AnimatedDrawable is created and added to the frame, like that : for (int i = 0; i < 10; i++) { sampleView = new SampleView(Drink.this); frame.addView(sampleView); } But when I do that from the backgroun...
Hi, i am developing an application where one of my Activity contains a button as "Set as Home Page" . So my problem is that when i will click this button the status will be saved in the shared preference and next time when this application will be opened i want to start this Activity(the Activity which has been set as home page) inst...
In C++, ff I have a class that needs to hold a member which could be dynamically allocated and used as a pointer, or not, like this: class A { type a; }; or class A { A(); ~A(); type* a; }; and in the constructor: A::A { a = new type(); } and destructor: A::~A { delete a; } are there any advantages or ...
I'm not exactly sure how best to phrase my question, so I'll start by explaining what I am trying to do. I have a page that has some code similar to a Google Analytics pixel code. Something like this: <div id="mydiv"></div> <script src="blahblah.php"></script> The PHP script returns some javascript that will insert another snippet i...
I'm using the Dynamic.ParseLambda method from the Dynamic LINQ library to create expressions, compile each to a Func<>, and cache each in a dictionary: // parse some dynamic expression using this ParseLambda sig: Expression<Func<TArgument,TResult>> funcExpr = System.Linq.Dynamic.ParseLambda<TArgument, TResult>( expressionString, // ...
I saw this Q&A http://stackoverflow.com/questions/2900763/mongodb-norm-query-nested-objects, but it seems to apply to strongly-typed objects only. Is there a way to do a find or update a nested field on an Expando object (http://wiki.github.com/atheken/NoRM/expando)? Basically, I have a simple JSON CMS tool that lets developers store do...