behavior

Problem with combined Authentication/Login view.

I have been using Django for several years now and up until this point have always redirected users to a login page after registering their account, and therefore have never had a problem of this sort. I am currently running Django v1.01 and on a new yet-to-be-released site have a combined registration/authenticate/login view which ...

How to use webservice behaviour in IE?

Hi, i am trying to call a webservice by using the IE's WebService behaviour object. As describen in the JS book book, I have inserted my div element: <div id="service" style="behaviour(webservice.htc)" onresult="onWebServiceResult()"> And I have my js globals and function: <script type="text/javascript"> var iCallId = -1; ...

Best resource for learning and seeing examples of Behavior Driven Development (BDD)

Hi, I am trying to creating Cucumber/Gerkin BDD Feature and Scenario descriptions, and am seeking examples just at the domain specific language. In particular, examples and suggestions to make sure I cam covering corner conditions, clear examples so we are following best practices and approaches, to make sure both developers and BA's a...

Silverlight PRISM, creating a behavior

Hi Guys, I've been trying to create a basic behavior in my PRISM based silverlight project. Something like http://csharperimage.jeremylikness.com/2009/10/silverlight-behaviors-and-triggers%5F09.html the problem I am having is that the OnAttached() and OnDetaching() methods of the behavior get called fine but when I set up my event hand...

jQuery unexpected sortable behaviour

Hi all, I'm working on a project where I can generate Word documents, one of the functionalities is to define a table of contents. I want my TOC to be a sortable jQuery list for sorting the chapters. I'm retreving the data recursivly from a MySQL table, which functions as expected. Since I found there are some strange behaviors in IE7 ...

Silverlight behavior based on update of view model property

Hi, I'd like to have a Silverlight behavior that is triggered by a change to a property in the view model for my page. I can't figure out how to do this, however. So, I have a very simple view model: public class MyViewModel : INotifyPropertyChanged { private bool changingProperty; public bool ChangingProperty { ge...

How do i switch into the code assist window in Coldfusion Builder with my keyboard?

Probably a really stupid question but i can't figure it out. When i type a tag in cfbuilder the code assist shows up but i am not able to jump into this window with a keyboard key (like Tab or down-arrow). I have to mouse-click on the window before i am able to navigate within it with the arrow keys. In cfeclipse it is possible to just...

When to use State vs Behavior Verification

In some cases its obvious when one or the other is warranted in other cases its not so clear. Take the following examples: A method which takes two inputs, performs a calculation and returns the result. A method which calls a factory object's Create method, passes the newly created object to the Add method of a collection object and re...

How do I set a "preferred size" for a form?

I have some controls on a form, and I have them anchored to the left and right of the form to ensure they grow and shrink with the form. My form is also set to automatically grow and shrink in order to accommodate some labels that may get long strings. When those labels get their long strings removed, I want my form to go back to the wid...

Behaviour for binding - help needed

I have a requirement to create a behavior in blend 3.0 for binding. Following are the use cases User will drag and drop the binding behavior to any control. He will select the properties and data sources which they want to bind through property dialog of binding behavior. When the program executed the custom class created for bindin...

Problems with behaviors in Doctrine

Hello Stack Overflow! I have a problem in one of my projects, where I'm using Doctrine as an ORM. For some reason, when rebuilding the models and database structure, Doctrine ignores the behaviors and relations, I define in one of the table definitions. The YAML table definition looks like this: ... User: actAs: Timestampable...

c# how to FormWindowState.Normal

greetings, i have this code: private void aboutToolStripMenuItem_Click(object sender, EventArgs e) { this.WindowState = FormWindowState.Minimized; about About = new about(); About.ShowDialog(); } it minimizes the parent window state to minimized and displays a splash form. my question is when the ...

Installshield 2009 set quickpatch behaviour

Installshield 2009 Premier I created a basic msi project binary output are: setup.exe, Data1.cab, HelloWorld.msi Then I created a quick patch project, referenced HelloWorld.msi & replaced a dll file When I run Update.exe[in a machine where I already set up 1] to update, it wants to restart, its ok But after restart if I again do ...

stl::deque's insert(loc, val) - inconsistent behavior at end of deque vs other locations?

Using http://www.cppreference.com/wiki/stl/deque/insert as a reference, I was inserting values into a deque at certain locations. For example, if deque A was: a, b, d, e, g with an iterator pointing to d, i can: A.insert(iter, c); // insert val c before loc iter //deque is now a, b, c, d, e, g and the iter still points to d....

Silverlight TextBox, moving caret position

Hi, I am trying to make a TextBox behavior for an on-screen keyboard, it can update the text in the textbox but I can't get it to focus the textbox and move the caret to the end of the text once it's done updating. I have tried using TextBox.Focus() and TextBox.Select() in both orders with no luck. Thanks for your time ...

CakePHP - how to apply translate behavior to existing database?

Hi! I have and existing application in CakePHP with a database. The task is to apply translate behavior to its models. The problem is that i18n.php script just creates _i18n table but doesn't copy existing data to this table. Don't you know any script that could do that? Thanks for any help. ...

Defining Game Object Behaviors in XML

I'm sure that there is a design pattern solution to my problem, but I can't seem to decide what a workable approach is. I know what I want, I'm just having trouble making the connections... I'll explain: I'm working on a game. I have GameObjects. I have GameBehaviors. The properties of my GameObjects are defined in an XML file which has...

Validity of the code

Consider the following code : void populate(int *arr) { for(int j=0;j<4;++j) arr[j]=0; } int main() { int array[2][2]; populate(&array[0][0]); } There was a discussion regarding this on a local community whether the code is valid or not(Am I supposed to mention its name?). One guy was saying that it invokes UB because...

Differences in behavior between System.Web.Configuration.WebConfigurationManager and System.Configuration.ConfigurationManager

Hi, I had some trouble on a test server with an ASP.NET website. I goofed, and had the home directory of the Default Web Site pointed to the wrong place. When I tried: ConfigurationManager.ConnectionStrings["connectionString"]; it returned null, but System.Configuration.Configuration rootWebConfig = System.Web.Configuratio...

CakePHP External API aggregation - A Model, Datasource & Behaviour Design Question - Best Practice

Hi, I have a project that requires me to integrate with 2 REST APIs and then aggregate the results. I am building this project in CakePHP My basic approach is: Product (model) Products (controller) API1 (datasource) API2 (datasource) Aggregation (behaviour) The basic flow is: 1. User enters a product name into a search form /products...