problem about modeling-Collection of common programming errors


  • MetaFight
    object-oriented modeling
    I’m currently in the process of modelling a generic form of RNA and RNA transcription and I’m having difficulty finding a proper OO modeling of this area.Humans RNA has 4 types of Nucleotides (A, G, U, and C). An RNA strand is just a string of these 4 types. eg, AAGACAUUCUA…What I’m trying to model is more generic in the sense that I want to be able to decide the number of Nucleotide types at runtime.

  • holden
    ruby-on-rails modeling nested-forms nested-attributes
    I’m trying to add the user_id to a nested attribute that gets built by a parent controller but it doesn’t seem to have the desired effect?Ie. I have a model called Place.rb which accepts_nested_attributes_for :reviews and has_many :reviews, :as => :reviewable, :dependent => :destroyThe nested attribute works fine and I build it inside the Places controller like so…new action@review = @place.reviews.build(:user_id => current_user.id)create actionparams[:place].merge(:user_id => current_user.id) params[:place][:reviews_attributes].merge!(:user_id =

  • CE Thomas
    ruby-on-rails resources modeling
    Thanks to everyone for their previous help. I am going to assume that this is going to be a pretty n00bish question but is a problem that I have and I can’t seem to figure it out.Basically,I am tracking firewalls and their zones/interfaces for a couple of hospitals. so my model looks like Hospital|–> Firewall|–> fwzonesI have gotten almost everything figured out except the new form.here is my routes.rbmine::Application.routes.draw doresources :hospitals doresources :firewalls doresources :fwzonesendend endhospital.rbclass Hospital < ActiveRecord::Basehas_many :firewalls, :dependent => :destroy endfirewall.rbclass Firewall < ActiveRecord::Basebelongs_to :hospitalhas_many :fwzones endfwzone.rbclass Fwzone < ActiveRecord::Basebelongs_to :firewall endfwzone contollerclass FwzonesController < ApplicationController ….def new@hospital = Hospital.find(params[:hospital_id])@firewall = @hospital.firewalls.find(params[:firewall_id])@fwzone = @firewall.fwzones.newrespond_to do |format|format.html # new.html.erbformat.xml { render :xml => @fwzone }endend …. endthe form strings that I have triedError: un

  • jcolebrand
    programming-languages haskell modeling functional-programming
    UML is a standard aimed at the modeling of software which will be written in OO languages, and goes hand in hand with Java. Still, could it possibly be used to model software meant to be written in the functional programming paradigm? Which diagrams would be rendered useful given the embedded visual elements?Is there a modeling language aimed at fun

Originally posted 2013-11-10 00:12:23.