Search Results

Search found 1102 results on 45 pages for 'recurrence relation'.

Page 26/45 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • Synonym for "Many-to-Many" relationship (relational databases)

    - by Byron
    What's a synonym for a "many-to-many" relationship? I've finished writing an object-relational mapper but I'm still stumped as to what to name the function that adds that relation. addParent() and addChild() seemed quite logical for the many-to-one/one-to-many and addSuperclass() for one-to-one inheritance, but addManyToMany() would sound quite unintuitive to an object-oriented programmer. addSibling() or addCousin() doesn't really make sense either. Any suggestions? And before you dismiss this as a non-programming question, please remember that consistent naming schemes and encapsulation are pretty integral to programming :)

    Read the article

  • accepts_nested_attributes_for and has_many :through relations.

    - by antiarchitect
    I want to make a simple examing application on RoR 2.3. The problem area is to make an exam_session in a one form with only one submit action. For the exam session there are selected some number of questions from the question pool in random order. For these questions there are selected some number of alternatives (to check is this a single answer question or multi answer question I use the number of correct alternatives: if only 1 - single, 1 - multi. Radiobuttons or checkboxes in form to answer depends on it). I have models: Questions ---< Alternative and ExamSession. I think there must be has_many :through relations between ExamSession and Questions and has_many :through relation between the intermediate table (for example QuestionsExamSession) and Alternative to point what alternatives are answers of the student on this Question. So the questions are: Is this scheme is too complicated and there is a way to do it simple and clear? Is there any way to organize models in such a way to make the form I want to work?

    Read the article

  • Suggest Cassandra data model for an existing schema

    - by Andriy Bohdan
    Hello guys! I hope there's someone who can help me suggest a suitable data model to be implemented using nosql database Apache Cassandra. More of than I need it to work under high loads and large amounts of data. Simplified I have 3 types of objects: Product Tag ProductTag Product: key - string key name - string .... - some other fields Tag: key - string key name - unique tag words ProductTag: product_key - foreign key referring to product tag_key - foreign key referring to tag rating - this is rating of tag for this product Each product may have 0 or many tags. Tag may be assigned to 1 or many products. Means relation between products and tags is many-to-many in terms of relational databases. Value of "rating" is updated "very" often. I need to be run the following queries Select objects by keys Select tags for product ordered by rating Select products by tag order by rating Update rating by product_key and tag_key The most important is to make these queries really fast on large amounts of data, considering that rating is constantly updated.

    Read the article

  • Retrieving related data in the Symfony Admin Generator

    - by bjoern
    I have a problem with the Admin Generator. The Table of Pages have the column sf_guard_user_id. The rest of the table looks as this part of the generator.yml in the line display, list: title: Pages display: [=title, sfGuardUser, views, state, privacy, created_at, updated_at] sort: [created_at, desc] fields: sfGuardUser: { label: Author } created_at: { label: Published, date_format: dd.MM.y } updated_at: { label: Updated, date_format: dd.MM.y } table_method: retrieveUserList Now the sf_guard_user_id is been replaced and the username ist displayed. Don't get me wrong, that works fine. But how can I get other variables from the sfGuarsUser relation? When I only add salt or another variable to display I get this, Unknown record property / related component "salt" on "simplePage" But why?

    Read the article

  • SQL to retrieve the latest records, grouping by unique foreign keys

    - by jbox
    I'm creating query to retrieve the latest posts in a forum using a SQL DB. I've got a table called "Post". Each post has a foreign key relation to a "Thread" and a "User" as well as a creation date. The trick is I don't want to show two posts by the same user or two posts in the same thread. Is it possible to create a query that contains all this logic? # Grab the last 10 posts. SELECT id, user_id, thread_id FROM posts ORDER BY created_at DESC LIMIT 10; # Grab the last 10 posts, max one post per user SELECT id, user_id, thread_id FROM post GROUP BY user_id ORDER BY date DESC LIMIT 10; # Grab the last 10 posts, max one post per user, max one post per thread???

    Read the article

  • find the colour name from a hexadecimal colour code

    - by sree01
    Hi , i want to find the name of a colour from the hexadecimal colour code. When i get a hex colour code i want to find the most matching colour name. for example for the code #c06040 , how to find out if it is a shade of brown, blue or yellow ?. so that i can find the colour of an object in the image without human intervention. Is there any relation between the hexadecimal code of the shades of a colour? please give some sample code if there is any.

    Read the article

  • ExpressionEngine: Why is this {exp:query} tag producing an error?

    - by Josh Brown
    Hi. I have this code in place to pull some relation data from the database based on a ID of another weblog entry. The relationship custom field would not work for my situation. I have tested the SQL with MySQL and get no errors. But I get an error when I pull up the page. {exp:query sql="SELECT entry_id,field_id_16,field_id_19 FROM exp_weblog_data WHERE field_id_15='2' AND weblog_id='6'"} Also, I want to populate the “field_id_15” from the url. I have tried using the “segment_*” tag, but nothing. Maybe it is something else. Any help is greatly appreciated. Thanks, Josh

    Read the article

  • rails: include statement with two ON conditions

    - by Markus
    Hi, I have tree tables books bookmarks users where there is a n to m relation from books to users trough bookmarks. Im looking for a query, where I get all the books of a certain user including the bookmarks. If no bookmarks are there, there should be a null included... my sql statement looks like: SELECT * FROM `books` LEFT OUTER JOIN `bookmarks ` ON bookmarks.book_id = books.id AND bookmarks.user_id = ? In rails I only know the :include statement, but how can I add the second bookmarks.user_id = ? statement in the ON section of this query? if I put it in the :conditions part, no null results would get returned! Thanks! Markus

    Read the article

  • GAE datastore eager loading in python api

    - by tomus
    I have two models in relation one-to-many: class Question(db.Model): questionText = db.StringProperty(multiline=False) class Answer(db.Model): answerText = db.StringProperty(multiline=False) question = db.ReferenceProperty(Question, collection_name='answers') I have front-end implemented in Flex and use pyamf to load data. When i try to load all answers with related questions all works as desired and I can access field answer.question however in case of loading questions (e.g. by Questions.all() ), 'question.answers' remains empty/null (though on server/python side I can revise question.answers without problem - probably after lazy-loading). So is it possible to load all questions along with answers ? (I know this is possible in JPA Java api but what about python ?) Shoud I use additional setting, GQL query or django framework to make it work ?

    Read the article

  • How do I Relate these 4 Tables

    - by Baddie
    Trying to setup a simple Thread/Poll table mapping. Here is what I have: Threads table ThreadID (Primary Key/Identity Column) Polls table PollID (Primary Key, FK for ThreadID for one-to-one relation) Question PollOptions table PollOptionID (Identity/Primary Key) Text PollID PollVotes table PollVoteID (Primary Key/Identity) PollOptionID I'm not sure if this is a proper relationship. It seems wrong but I'm not sure whats wrong with it. A Thread can have 0 or 1 Poll. A Poll can have 2 or more PollOptions. A PollOption can have 0 or many PollVotes. I'm going to be using Entity Framework and before I generate the code for it (VS 2010, .NET 4) I want to make sure I have the proper relationship mapping.

    Read the article

  • Change notification in EF EntityCollection

    - by Savvas Sopiadis
    Hi everybody! In a Silverlight 4 proj i'm using WCF RIA services, MVVM principles and EF 4. I 'm running into this situation: created an entity called Category and another one called CategoryLocale (automated using VS, no POCO). The relation between them is 1 to N respectively (one Category can have many CategoryLocales), so trough this relationship one can implement master-detail scenarios. Everytime i change a property in the master record (Category) i get a notifypropertychanged notification raised. But: whenever i change a property in the detail (CategoryLocales) i don't get anything raised. The detail part is bound to a Datagrid like this: <sdk:DataGrid Grid.Row="3" Grid.ColumnSpan="2" ItemsSource="{Binding SelectedRecord.CategoryLocales,Mode=TwoWay}" AutoGenerateColumns="False" VerticalScrollBarVisibility="Auto" > Any help is appreciated! Thanks in advance

    Read the article

  • Need Help on entity framework

    - by Sarathi1904
    I have 3 tables(Roles,Actions and RoleActionLinks). Roles table has few columns(RoleID,RoleName,Desc). Actions table has few colums(ActionID,ActionName,Desc). In RoleActionLink is created for store the association between Roles and Actions and this table has the columns such as RoleID,ActionID When I created the data model(edmx). it shows only Role and Action as entity. i did not find RoleActionLink table. but even there is no direct relation between Roles and Actions table, both tables are automatically related using RoleActionLink table. When i create the new Action, a action record should be populated in Action table(this is works fine). At the same time, i need to populate record in RoleActionLinks table. But i dont have the entity to populate. Please tell me how to accomplish my needs.

    Read the article

  • ACCESS VBA - DAO in VB - problem with creating relations

    - by Justin
    So take the following example: Sub CreateRelation() Dim db As Database Dim rel As Relation Dim fld As Field Set db = CurrentDb Set rel = db.CreateRelation("OrderID", "Orders", "Products") 'refrential integrity rel.Attributes = dbRelationUpdateCascade 'specify the key in the referenced table Set fld = rel.CreateField("OrderID") fld.ForeignName = "OrderID" rel.Fields.Append fld db.Relations.Append rel End Sub I keep getting the error, No unique index found for the referenced field of the primary table. if i include the vb before this sub to create in index on the field, it gives me the error: Index already exists. so i am trying to figure this out. if there are not any primary keys set, will that cause this not to work? i am confused by this, but i really really want to figure this out. So orderID is a FOREIGN KEY in the Products Table please help thanks justin

    Read the article

  • Eta/Eta-squared routines in R

    - by aL3xa
    Apart from graphical estimation of linearity (gaze-at-scatterplot method), which is utilized before applying some technique from GLM family, there are several ways to do this estimation arithmetically (i.e. without graphs). Right now, I'll focus on Fisher's eta-squared - correlation ratio: arithmetically, it's equal to squared Pearson's r (coef. of determination: R2) if relationship between two variables is linear. Hence, you can compare values of eta and r and make an assessment about type of relation (linear or not). It provides an information about percent of variance in the dependent variable explained (linearly or not) by the independent variable. Therefore, you can apply it when linearity assumptions are not met. Simply stated: is there a routine for eta/eta-squared in R?

    Read the article

  • xval get message from resource file

    - by Rob
    I'm working on a CMS system which uses a resource file to get information and errormessages from. The client side validation is working without problems, only it's not getting the errormessage from the resource file. While debugging i figured out xval seems to get the errormessages from a javascript file where the messages are set hard-coded. Is there some way to override this? Below the code which should make the relation to the resourcefile en specify the error when the field is left empty. [Property] [Required(ErrorMessageResourceType = typeof(CMSMessages), ErrorMessageResourceName = "EnterValidMoney")] public virtual Double ShippingCost { get; set; }

    Read the article

  • Problem with nested lambda expressions.

    - by Lehto
    Hey I'm trying to do a nested lambda expression like to following: textLocalizationTable.Where( z => z.SpokenLanguage.Any( x => x.FromCulture == "en-GB") ).ToList(); but i get the error: Member access 'System.String FromCulture' of 'DomainModel.Entities.SpokenLanguage' not legal on type 'System.Data.Linq.EntitySet`1[DomainModel.Entities.SpokenLanguage]. TextLocalization has this relation to spokenlanguage: [Association(OtherKey = "LocalizationID", ThisKey = "LocalizationID", Storage = "_SpokenLanguage")] private EntitySet<SpokenLanguage> _SpokenLanguage = new EntitySet<SpokenLanguage>(); public EntitySet<SpokenLanguage> SpokenLanguage { set { _SpokenLanguage = value; } get { return _SpokenLanguage; } } Any idea what is wrong?

    Read the article

  • Best way to implement keywords for image upload gallery

    - by Dan Berlyoung
    I'm starting to spec out an image gallery type system similar to Facebook's. Members of the site will be able to create image galleries and upload images for others to view. Images will have keywords the the uploader can specify. Here's the question, what's the best way to model this? With image and keyword tables linked vi a HABTM relation? Or a single image table with the keywords saved as comma delimited values in a text field in the image record? Then search them using a LIKE or FULL TEXT index function? I want to be able to pull up all images containing a given keyword as well as generate a keyword cloud. I'm leaning toward the HABTM setup but I wanted to see what everyone else though. Thanks!!

    Read the article

  • CodeIgniter based e-shop, shipping and gift address design problem

    - by alexander
    While building an ecommerce platform I have run into design problems. I'm working with the built-in CodeIgniter's cart class. It stores all the cart information in session. Let say that cart has already been filled with products and user clicks checkout. When should I store order in database? Just after that click or after several steps of gathering information and stoing it in session? How to deal with additional features like different shipping methods? Should I add it to the basket first and get additional (gift address) to session? I dont want to store it in database because of the relation between gift address and order is needed and since I dont know what's the ID of the order. I'm puzzled :) Additionally I think its crucial to keep cart aware of shipping methods and additional bought services (by selecting gift address there is an extra fee) because the cart content is just like an reciept? In brief, what is the best practice to process checkout?

    Read the article

  • How to implement this mechanism:

    - by Sorush Rabiee
    Hi i want to implement a dynamic relation mechanism with python something like: a:=10 b:=30 c:=a+b print c a+=20 print c output: 40 60 c is always result of a+b. so if a or b change, then c automatically updates value. i write a code in C# and do this by set and get mechanism. now want to translate it to python code for using in another program (FontLab Studio 5). I'm not so familiar with Python. does he have a get,set feature like C#? if not ho to implement one?

    Read the article

  • Entities groups in transactions

    - by Joel
    In the context of "Keys and Entity Groups" article by google: http://code.google.com/appengine/docs/python/datastore/transactions.html 1) "Only use entity groups when they are needed for transactions" 2) "Every entity belongs to an entity group, a set of one or more entities that can be manipulated in a single transaction." It seems like entity groups exist only for the use of transactions, i.e. making one transaction possible between all entities in a group. My question is then why are there parent-child relations between entities and not just a simple declaration of entities to be in a single group (that is defining A,B,C to be in the same group as opposed to defining relations between them "A (parent of) B, B (parent of C)"). What is the benefit from using parent-child relation model when the only purpose is for entities to be in the same group to make transaction possible? Thanks Joel

    Read the article

  • Adding Existing Framework to Xcode (iPhone) error

    - by Urizen
    I have added the <QuartzCore/QuartzCore.h> to my Frameworks folder in my iPhone project and added the #import "<QuartzCore/QuartzCore.h>" statement at the top of a custom UIView class. However the custom UIView class gives me a "No such file or directory" compliation error in relation to the <QuartzCore/QuartzCore.h> framework. Is there something else I need to set so that the compiler can see the framework. I'm not expert on the Xcode IDE so any assistance would be extremely welcome.

    Read the article

  • Fetch posts with attachments in a certain category?

    - by TiuTalk
    I need to retreive a list of posts that have (at least) one attachment that belongs to a category in WordPress. The relation between attachments and categories I made by myself using the WordPress default method. Here's the query that i'm running right now: SELECT p.* FROM `wp_posts` AS p # The post INNER JOIN `wp_posts` AS a # The attachment ON p.`ID` = a.`post_parent` AND a.`post_type` = 'attachment' INNER JOIN `wp_term_relationships` AS ra ON a.`ID` = ra.`object_id` AND ra.`term_taxonomy_id` IN (3) # The category ID list WHERE p.`post_type` = 'post' ORDER BY p.`post_date` DESC LIMIT 15 The problem here is that the query only use the first found attachment, and if it doesn't belongs to the category, the result isn't returned.

    Read the article

  • Please list here your deliberate practices in software development...

    - by JDelage
    What are your deliberate practices in relation with your work as a software developer / professional, or as a CS student? Deliberate practice are exercise and repetitions targeted specifically at an individual's weak points and meant to consistently stretch / grow someone's ability. It was described in this Anders Ericsson paper. To qualify as a deliberate practice, the exercise must satisfy the following: Is not inherently enjoyable. Is not play or paid practice. Is relevant to the skill being developed. Is not simply watching the skill being performed. Requires effort and attention from the learner. Often involves activities selected by a coach or teacher to facilitate learning. Please answer with one practice per answer. I'll seed the question with one possible answer.

    Read the article

  • Javascript snippet to convert doxygen style comment to HTML

    - by Tobi
    In relation to this question, I was wondering if anyone knows a javascript code snippet/library to convert a single doxygen comment to HTML? For example, /** This is a comment block * * \b bold text * \i italic text */ would be converted to something like: <p>This is a comment block</p> <p><b>bold</b> text</p> <p><i>italic</i> text</p> Similar for all the other formatting related tags of doxygen. I've found this already, which seems to be a good starting point if I have to implement it myself, but possibly I'm missing a complete project :-) So, suggestions welcome!

    Read the article

  • How Manage Big Linq DataContext ?

    - by Rev
    Hi The major problem in .net programs is "How manage memory for best performance". so Microsoft use garbage collector in .net and with that, we don't need to do something for managing memory(or better say we can use GC easily) But when you develop big project(business app), you make too many tables and database for your own project. so if you use Linq-to-sql, we must build DataContext include hundred or more tables. That make problem for program when you create an object from datacontext, that object give big amount of memory. also we cant divide datacontext to datacontexts(cuz relation between tables) so "How manage datacontext and memory"?

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >