Search Results

Search found 25123 results on 1005 pages for 'domain model'.

Page 117/1005 | < Previous Page | 113 114 115 116 117 118 119 120 121 122 123 124  | Next Page >

  • interactive (adding listeners to) DAE model in flex + papervision

    - by G. Matthieu
    I have a DAE model that is parsed into several parts. I am able to deal with them separately, such as changing their material or colour but I am having problems adding click or hover listeners over the children. For example, lets say I have a model of a kitty where each facial feature is a child. I want to be able to hover or click the features and have a window pop up explaining the feature. I've tried parsing the model and adding listeners but it doesn't seem to work. Thanks in advance! L

    Read the article

  • Do I need to include all fields in my entity framework model

    - by Jim B
    Quick question for everyone: Do I need to include all the database table fields on my EF model? For example; I've created a sub-model that only deals with tblPayment and associated tables. Now, I need to write a LINQ query to get some information about items. I would typically get this by joining tblPayment to tblInvoice to tblInvoiceItem to finally tblOrderItem. I'm wondering if when I add in those other tables, do I need to include all the fields for tblInvoice and tblInvoiceItem? Ideally; I'd just like to keep the fields I'd need to join on, as that would limit the possibility of my sub-model breaking if other fields on those tables are modified/deleted. Can I do this?

    Read the article

  • Entity Framework model and foreign key property

    - by verror
    I have 2 tables that I import to EF model. First table has a property [section] that acts as foreign key to the second table. When I map this property in model to the table and try to compile I get this error: Problem in Mapping Fragments starting at lines 158, 174: Non-Primary-Key column(s) [Section] are being mapped in both fragments to different conceptual side properties - data inconsistency is possible because the corresponding conceptual side properties can be independently modified. If i remove this property from the model it passes, but when I query the data I don't have the section field. I know that I can get it by using the navigation field and reading this property from the second table, but to make it work I must include the other table in my query. var res = from name in Context.Table1.Include("Table2")... Why do I need to include the association just for one field?

    Read the article

  • how to call a view method to a model in zendframework

    - by Awais Qarni
    hello I just want to ask whether we can call a view method to a model? I know that we can call it on our controller in zend framework. Like if I want to call the url method of view on my controller I can call it like this $this->view->url(array(),''); and on the view we just can call it by $this->url(array(),''); But When I tried to call the same method on my model by $this->view->url(array(),''); it generates an error of call to undefined method url. Now I want to ask whether it is possible to call view method to a model? If yes then how? What Am I doing wrong. Thanks

    Read the article

  • Access sql server without directly permission in domain from ASP.NET

    - by Yongwei Xing
    Hi all Here is the situation. All the machines and users are in the same domain.We are in a domain enviroment. There are some sql server 2005/2008 storing data. There is a ASP.NET site in the domain using the Window Authentication. Now, we need read the data from the sql server and display them using SqlDataSource and GridView. But most of users do not have the direct permission to access the database. Is there any solution to get the data from database and display them on the site without granting users permission? Best Regards,

    Read the article

  • Rails: translate ActiveRecord error template headers for a single model

    - by Chris
    Hi, I'm trying to rename the authlogic error messages in a Rails 3 app. The general format I found out working in Rails 3: de: errors: template: header: one: "Konnte {{model}} nicht speichern: ein Fehler." other: "Konnte {{model}} nicht speichern: {{count}} Fehler." body: "Bitte überprüfen Sie die folgenden Felder: But I want to change this for the authlogic user session model (and only for this one) because when the Login fails, the message "Could not save user session" does not make very much sense. How can I do that?

    Read the article

  • Entity Framework 4 with Existing Domain Model

    - by ace
    Hi, Im currently looking at migrating from fluent nHibernate to ADO.Net Entity Framework 4. I have a project containing the domain model (pocos) which I was using for nHibernate mappings. Ive read in blogs that it is possible to use my existing domain model with EF4 but ive seen no examples of it. Ive seen examples of T4 code generation with EF4 but havent come accross an example which shows how to use existing domain model objects with EF4. Im a newby with EF4 and would like to see some samples on how to get this done. Thanks Aiyaz

    Read the article

  • ASP.NET MVC Url Masking/Rewriting

    - by Dan Appleyard
    Let us say I have a url of subdomain.domain.com. Is there a way in ASP.NET MVC to have a url of say otherdomain.com/gotothesubdomain that takes you to subdomain.domain.com? I know that a simple redirect could do it, but I want the url to stay as otherdomain.com/gotothesubdomain. Any advice would be greatly appreciated and thanks!

    Read the article

  • Using htaccess redirect all files to another domain but exclude the root domain.

    - by Shawn
    Recently, I want to restructure and redesign my website, my old website located at www.example.com, there are lots of blog posts under this domain, like: www.example.com/post1 www.example.com/post2 www.example.com/post3 ... I can redirect all those posts to another sub domain points in another folder (not sub folder), (if I put all those posts in a sub folder, it will recursive the subfolder name) , anyway, it works for me by using the code below: RewriteEngine On RewriteRule ^(.*)$ http://pre.example.com/$1 [L,R=301] But there is one things I want to do is not redirect the main domain, only all the posts. RewriteEngine on RewriteCond %{REQUEST_URI} !^/blog/ # the new blog # I tried below #RewriteCond %{REQUEST_URI} !^/$ #RewriteCond %{REQUEST_URI} !^www.example.com$ RewriteRule ^(.*)$ http://pre.example.com/$1 [L,R=301] Is it possible I can do that? Thx.

    Read the article

  • What is the best practice for accessing Model using MVVM pattern

    - by Dzenand
    I have a database that communicates with webservices with my Model (own thread) and exposes Data Objects. My UI application consists of different Views and ViewModels and Custom Controls. I'm using ServiceProvider (IServiceProvider) to access the Model and route the events to the UI thread. Communication between the ViewModels is handeled by a Messenger. Is this way to go? I was also wondering what is the best way to strucutre the DataObjects At the moment i have the DataObjects that have a hierarchy structure but does not support INotifyProperty though the children list are of type of ObservableCollection. I have no possiblity to implement notifypropertychange on the properties. I was wondering the best way of making them MVVM friendly. Implementing a partial class and adding all the properties or commands that are necessary or wrapping all the DataObjects and keep the Model list and MVVM list in sync. All thoughts and ideas are appreciated.

    Read the article

  • RewriteRule - Doesn't work on live site - subfolder to new domain

    - by eb_Dev
    I have the following rule on my local dev site and it works fine: RewriteCond %{HTTP_HOST} ^localhost$ RewriteRule ^subdomains/example.com(.*) http://www.example.com$1 [R=301,L] However when I change it to: RewriteCond %{HTTP_HOST} ^www.domain.com$ RewriteRule ^subdomains/example.com(.*) http://www.example.com$1 [R=301,L] and upload it to my live site it doesn't work, if i change the rule to: RewriteCond %{HTTP_HOST} ^www.domain.com$ RewriteRule ^subdomains/(.*) http://www.example.com$1 [R=301,L] the rule functions as expected and directs an url beginning with www.domain.com/subdomains/ to www.example.com/. Does anyone know what is going on here? Thanks for you help.

    Read the article

  • Domain object validation vs view model validation

    - by Brendan Vogt
    I am using ASP.NET MVC 3 and I am using FluentValidation to validate my view models. I am just a little concerned that I might not be on the correct track. As far as what I know, model validation should be done on the domain object. Now with MVC you might have multiple view models that are similar that needs validation. What happens if a property from a domain object occurs in more than one view model? Now you are validating the same property twice, and they might not even be in sync. So if I have a User domain object then I would like to do validation on this object. Now what happens if I have UserAViewModel and UserBViewModel, so now it is multiple validations that needs to be done. The scenario above is just an example, so please don't critise on it.

    Read the article

  • Weblogic 10.3 domain unpacking problem

    - by MarkoU
    Hi, I'm trying to unpack a Weblogic 10.3 domain on one of our production servers (SunOS 5.10), but get the following error: $ /opt/bea10/wlserver_10.3/common/bin/unpack.sh -template=/tmp/CM.jar -domain=/opt/bea10/user_projects/CM Error: failed to create the temporary script file Assuming that this is a priviledge problem: where actually the unpack utility tries to create its temporary script files? The unpack script calls a Java class com.bea.plateng.domain.script.Unpacker, so reading the script itself does not reveal the location. I need to ask the sysadmin for the priviledges, so an exact directory location is needed. Of course, the error message is so vague that this might also be some other issue. Any ideas? BR, Marko P.S. Sorry for cross-posting. I tried this question also on Serverfault but got no replies. Perhaps programmers (like myself) do this kind of stuff anyway.

    Read the article

  • Creating custom model using other models in ASP.NET MVC

    - by Soham Dasgupta
    As the title suggests I have two models Products And Orders which are actually two table in my database and I have used a LINQ to SQL class to create there models. Now I wan to create a model named "OrderDetails" which will have properties from both the model like product name and id from product and Order number from orders something like this. An then I want to create a view from this custom model and from which I want to add "CRUD" operation. What should be my approach. And in many scenarios I may have to use data from more than 4 models. Please help. I'm wondering helplessly and I have only two days experience in ASP.NET MVC.

    Read the article

  • Getting all pdf files from a domain (for example *.adomain.com)

    - by Zack
    I need to download all pdf files from a certain domain. There are about 6000 pdf on that domain and most of them don't have an html link (either they have removed the link or they never put one in the first place). I know there are about 6000 files because I'm googling: filetype:pdf site:*.adomain.com However, Google lists only the first 1000 results. I believe there are two ways to achieve this: a) Use Google. However, how I can get all 6000 results from Google? Maybe a scraper? (tried scroogle, no luck) b) Skip Google and search directly on domain for pdf files. How do I do that when most them are not linked?

    Read the article

  • Model's method not being recognized when called

    - by Brian Roisentul
    I'm using ruby on rails 2.3.2 and also using the acts_as_taggable_on puglin. That generated me two db tables: tags and taggings. As I didn't need anything more from those, I didn't create a Tag model, for example. Now the project is more mature, I need to create some methods for tags, so I created a Tag model with some methods in it. The model looks something like this: class Tag < ActiveRecord::Base def self.get_parent parent = Tag.find(self.parent_id) return parent end end When I call it from a controller, it won't find the method. This is the code: tag = Tag.find(tag_id) the_parent = tag.get_parent This will throw an error saying: undefined method `get_parent' for #<Tag id: 13, name: "Historia", parent_id: 12> I don't know what's wrong. Any help will be appreciated.

    Read the article

  • Passing JS variable from child Iframe to parent JSP on cross sub domain

    - by Tarun
    I am stuck at 1 location and need some help. I created two subdomains on apache tomcat server like domain1.localhost.com and domain2.localhost.com in server.xml. On domain1 I have a JSP that includes iFrame (hosted on domain2). How can we pass the JS variable from child Iframe to parent JSP and store it in local variable of JSP hosted on domain1.localhost.com? I tried defining document.domain = "localhost" on both JSP but didn't work. Even parent DOM window is also not available in child iFrame (on sub-domain) because of obvious cross domain policies. Any help would be highly appreciated.

    Read the article

  • asp.net mvc model - my own database

    - by progtick
    The tutorials I have come across usually let you create a dababase from scratch creating a .mdf file or something and so on. However, what if I already have a SQL Server Express set up with the needed database? How do I tell my model to use that database? Right now, all my model contains is basically some classes that execute stored procedure on my own database and return manupulated data. Should I leave it as it is? What are the benefits of going through the full-fledged model approach that tutorials demonstrate?

    Read the article

  • VS2008 project with Entity Framework model results in "always dirty" compile

    - by Jeremy Lew
    In VS 2008, I have a simple .csproj that contains an Entity Framework .edmx (V1) file. Every time I build the project, the output DLL is updated, even though nothing has changed. I have reproduced this in the simplest-possible project (containing one ordinary .cs file and one edmx model). If I remove the edmx model and build repeatedly, the output assembly will not be touched. If I add the edmx model and build repeatedly, the output assembly is modified each time. This is a problem because the real project is a dependency of dozens of other projects and it is wreaking havoc with what times when working in higher layers of the application. Is this a known problem? Any way to fix it? Thanks!

    Read the article

  • Django ForeignKey _set on an inherited model

    - by neolaser
    I have two models Category and Entry. There is another model ExtEntry that inherits from Entry class Category(models.Model): title = models.CharField('title', max_length=255) description = models.TextField('description', blank=True) ... class Entry(models.Model): title = models.CharField('title', max_length=255) categories = models.ManyToManyField(Category) ... class ExtEntry(Entry): groups= models.CharField('title', max_length=255) value= models.CharField('title', max_length=255) ... I am able to use the Category.entry_set but I want to be able to do Category.blogentry_set but it is not available. If this is not available,then I need another method to get all ExtEntryrelated to one particular Category Thanks

    Read the article

  • When does logic belong in the Business Object/Entity, and when does it belong in a Service?

    - by Casey
    In trying to understand Domain Driven Design I keep returning to a question that I can't seem to definitively answer. How do you determine what logic belongs to a Domain entity, and what logic belongs to a Domain Service? Example: We have an Order class for an online store. This class is an entity and an aggregate root (it contains OrderItems). Public Class Order:IOrder { Private List<IOrderItem> OrderItems Public Order(List<IOrderItem>) { OrderItems = List<IOrderItem> } Public Decimal CalculateTotalItemWeight() //This logic seems to belong in the entity. { Decimal TotalWeight = 0 foreach(IOrderItem OrderItem in OrderItems) { TotalWeight += OrderItem.Weight } return TotalWeight } } I think most people would agree that CalculateTotalItemWeight belongs on the entity. However, at some point we have to ship this order to the customer. To accomplish this we need to do two things: 1) Determine the postage rate necessary to ship this order. 2) Print a shipping label after determining the postage rate. Both of these actions will require dependencies that are outside the Order entity, such as an external webservice to retrieve postage rates. How should we accomplish these two things? I see a few options: 1) Code the logic directly in the domain entity, like CalculateTotalItemWeight. We then call: Order.GetPostageRate Order.PrintLabel 2) Put the logic in a service that accepts IOrder. We then call: PostageService.GetPostageRate(Order) PrintService.PrintLabel(Order) 3) Create a class for each action that operates on an Order, and pass an instance of that class to the Order through Constructor Injection (this is a variation of option 1 but allows reuse of the RateRetriever and LabelPrinter classes): Public Class Order:IOrder { Private List<IOrderItem> OrderItems Private RateRetriever _Retriever Private LabelPrinter _Printer Public Order(List<IOrderItem>, RateRetriever Retriever, LabelPrinter Printer) { OrderItems = List<IOrderItem> _Retriever = Retriever _Printer = Printer } Public Decimal GetPostageRate { _Retriever.GetPostageRate(this) } Public void PrintLabel { _Printer.PrintLabel(this) } } Which one of these methods do you choose for this logic, if any? What is the reasoning behind your choice? Most importantly, is there a set of guidelines that led you to your choice?

    Read the article

  • create a model in create action from a class

    - by Pontek
    As a newbie to rails I can't find how to solve my issue ^^ I want to create a VideoPost from a form with a text field containing a video url (like youtube) I'm getting information on the video thanks to the gem https://github.com/thibaudgg/video_info And I want to save thoses information using a model of mine (VideoInformation). But I don't know how the create process should work. Thanks for any help ! I'm trying to create a VideoPost in VideoPostsController like this : def create video_info = VideoInfo.new(params[:video_url]) video_information = VideoInformation.create(video_info) #undefined method `stringify_keys' for #<Youtube:0x00000006a24120> if video_information.save @video_post = current_user.video_posts.build(video_information) end end My VideoPost model : # Table name: video_posts # # id :integer not null, primary key # user_id :integer # video_information_id :integer # created_at :datetime not null # updated_at :datetime not null My VideoInformation model (which got same attributes name than VideoInfo gem) : # Table name: video_informations # # id :integer not null, primary key # title :string(255) # description :text # keywords :text # duration :integer # video_url :string(255) # thumbnail_small :string(255) # thumbnail_large :string(255) # created_at :datetime not null # updated_at :datetime not null

    Read the article

  • Moving .JS files to a CDN: How to manage AJAX requests?

    - by pagewil
    I am thinking of moving my static .JS files to a CDN such as Amazon S3 for performance reasons. As my PHP files and mySQL DB remain on my primary hosting domain what is the best way to manage my JS AJAX requests if they are now cross domain? Currently they look like this within my .JS file (with relative paths): $.ajax({ type: "POST", url: "/myNearbyPhpFile.php", data: {data:someData}, success: function($r){} });

    Read the article

  • Rails model to represent multiple fields

    - by Tristan O'Neil
    I'm developing a rails project where I have one data model with multiple fields that are collection selects. I'd like to create another model to represent all of these collection select fields. So, for instance, my main data model has three collection select fields -- one for county, one for category, and one for classification. I could separate these into three separate data models, but that seems redundant since they all share the same characteristics. They have a type and a value, like a county is a county and it has a value of let's say Sonoma, just as category has a type of category and a value of let's say Winery. If you've ever used Drupal, I'm basically looking for the behavior of the taxonomy functionality. So you see my dilemma: I need to separate these fields into three separate fields but they have very similar data structures. Any suggestions would be greatly appreciated.

    Read the article

  • How to add model entity property in WCF RIA service

    - by Oblomingo
    I'm developing silverlight app with WCF Ria service. I'm using MS SQL database and Entity Framework as ORM framework (Database first method). Model with domain service are in separate project - App1.Data. Silverlight and generated model proxy classes are in App1 project. I want to add property to model entity class EntityClass to get this property on client side. So I did it that way - added this class to project App1.Data: public partial class EntityClass { [DataMember] public List<EntityClass2> PropertyName {get; set;} } After rebuilding EntityClass proxy on client side doesn't have this new property. Where is my mistake?

    Read the article

< Previous Page | 113 114 115 116 117 118 119 120 121 122 123 124  | Next Page >