model

devart dotConnect MySQL

Hello. I've been evaluating MindScape Lightspeed for the purpose of Model creation. So far I am satisfied. I was further looking for OOTB (actually some professional quality code) providers for MySQL for ASP.Net. I've come across 'dotconnect for MySQL' from Devart. This looks like fitting the bill for the latter requirement. It also has ...

[R] GLM with autoregressive term to correct for serial correlation

Hi I have a stationary time series to which I want to fit a linear model with an autoregressive term to correct for serial correlation, i.e. using the formula At = c1*Bt + c2*Ct + ut, where ut = r*ut-1 + et (ut is an AR(1) term to correct for serial correlation in the error terms) Does anyone know what to use in R to model this? Than...

Understanding Rails Unit Testing: Is it still a unit test if a single test tests model interdependencies?

Besides the fact that Rails incorporates the database layer into the unit tests (which then is strictly not a unit test), what if I test for model interdependencies, e.g. check if has_many/belongs_to with :dependent => :destroy really destroys the associated items or items from join models to not leave orphans around? Should such a test...

C# Entity Model Result Filtering

I have some data bound controls which are bound to a bindingSource which is bound to a entity model. The problem I've run into is I need to be able to allow the user to filter to a specific record to update information and when a bindingSource is tied to an entity model filtering is disabled. What would be the best way around this? Sh...

Stuctures of Complex and enterprise level applicaitons

I have a problem about structures of the complex applications .Because my knowledge background does not come from education , i have had always problem about application's layers , design patterns and programing structures.First of all , I can do whatever I want with php , because I know common functions and I have experience with php. B...

Find most commented posts

I have a blog, and I would like to find out the best way to find the most commented posts. I have a straight setup with posts have many comments, and comments belong to posts. I am trying to find a 1 line "right way" to do this, but can't find it. I would like to get like a top 10 commented posts. Thanks ...

How do I import a Model from another Model in CakePHP

Desc Model belongsTo Prod Model. I want that all Prod.Name will appear as checkboxes when adding a new desc, so that user will just click a Prod.Name when adding a new description for it. Like: <?php echo $form->create('Desc'); echo $form->checkBox(Prod.Name); // assuming this is the correct code. echo $form->textArea('Desc.content'); e...

PHP Symfony Framework - Use specific layout for a model

Hi there! Can anyone tell me how can I define and use a specific layout for a model (not a template)? I would like to do this for my custom 404 error page. Thanks in advance, Best regards! ...

How to update QCompeter's model dynamically

I use QCompleter with QLineEdit, and I want to update QCompleter's model dynamically. i.e. the model's contents are updated according to QLineEdit's text. 1) mdict.h #include <QtGui/QWidget> class QLineEdit; class QCompleter; class QModelIndex; class mdict : public QWidget { Q_OBJECT public: mdict(QWidget *parent = 0); ~...

How do you store business activities in a SQL database?

The goal is to store activities such as inserting, updating, and deleting business records. One solution I'm considering is to use one table per record to be tracked. Here is a simplified example: CREATE TABLE ActivityTypes ( TypeId int IDENTITY(1,1) NOT NULL, TypeName nvarchar(50) NOT ...

Trouble passing complex data between view and controller in ASP.NET MVC

Here's a simplification of my real models in ASP.NET MVC, that I think will help focus in on the problem: Let's say I have these two domain objects: public class ObjectA { public ObjectB ObjectB; } public class ObjectB { } I also have a view that will allow me to create a new ObjectA and that includes selecting one ObjectB from ...

ASP.NET MVC Model confusion

Background I'm learning the ropes around how to use ASP.NET MVC properly, and ran into this issue with models: I have a model that describes a contact I can get that out of the form for creating a new contact, but say when we edit a form, I retrieve it from the repository, show the fields on the contact form and then get the contact ob...

Best way to model these relationships in Rails

I'm looking to create a Rails application with three models. One model represents cars, another represents the colors cars can be painted, and a third represents an order for a car in some color. What's the best way to structure the relationship between these models? ...

Aynchronous WebService call.

I have ASP.NET website, and it calls the asmx web-service to do some operation asynchronously _service.Beginxxx(request, null, null); which will run in separate thread (created by thread pool), what if the user close the browser, is this method still keep running and eventually do what I am expecting or it will abort? ...

Use of XML for Model class and structuring

Hi there, I am currently working on a little application: The structure follows in some way the MVC pattern. For short it has the basic things, Models, Controllers etc. Now I am sitting here and do not know whether : 1. The SQL database is only managed by a model through methods the programmer gives him like: "Hey we have name reco...

Model for ASP.NET MVC

Hi I just started with ASP.NET MVC 1.0. I've read through some tutorials but I don't have any good ideas on how to build my model. I've been experimenting with LINQ to SQL. Can't say I like it that much, but I'll give it a try. I prefer using SQL Stored Procedures, but it doesn't seem to work very good together with the optional parame...

Rails model generator - from existing database

Hello, Is there any working automatic model generator for creating a model from existing database? Something like symfony's task symfony doctrine:build-model. I found just Dr Nic’s magic model generator but it doesn't work with rails 2.3+. Please do not recommend Dr Nic's magic models. That's not what I want. I don't believe that ther...

django user relationship

Using django, say I have model classes A and B, representing different types of Companies. Each Company may have multiple Users associated with it. Obviously I'd like to use django's User model, to get the login, etc. goodness. How would I go about doing that? Would I add a UserProfile that has two foreign keys, one to A and one to B...

Model & Mapper relationship

Hi there, I currently work on a small application with models, mappers and controllers. My question is, (because I did not found any matching answer), how does the mapper interact with the model (& the controller), when we have the following situation. $user = new UserModel(); $user->setId('21'); $userMapper = new UserMapper($user); $u...

Creating Qt models for tree views

I'm writing an application in Qt (with C++) and I need to represent an object structure in a tree view. One of the ways to do this is to create a model for this, but I'm still quite confused after reading the Qt documentation about the subject. The "structure" I have is pretty simple - there's a Project object that holds Task objects in...