dynamic

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>? ...

Dynamic Dictionary usage Problem in C#

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...

Slicing problem?

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_ */ /* * ...

using ajax to call a url

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 ...

Trying to come up with a way to write a web cms

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...

Maintaining visibility settings through persistence in dynamically created controls

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...

Android accessing buttons created dynamically

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 ...

Sql Server Dynamic Database Partitioning

Hi, Is there anything called dynamic partitioning in SQL server? If so how can i implement it? ...

How to get InitializeComponent to instantiate a derived control at runtime in a C# control

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...

django dynamic FilePathField

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...

Dynamically loading two libpython versions

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...

CMS or Framework for a tag-centric site?

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...

Why won't my script update my div dynamically like it's supposed to?

<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) ...

Dynamic transparent background in my Android App Java

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...

Dynamic addition of a View [Android] from background thread

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...

dynamically lunching activity in android

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...

Dynamic vs non-dynamic class members

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 ...

chain of dynamic external javascript calls

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...

Cache delegate of compiled Dynamic Linq Func<> *without* params?

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, // ...

MongoDB NoRM: query nested objects using Expando

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...