Search Results

Search found 6569 results on 263 pages for 'specification pattern'.

Page 5/263 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Software requirements specification, please help!

    - by Nicholas Chow
    For a school project, I had to create a SRS for a "fictional" application. However they did not show us what it exactly entails, and were very vague with explanations. The SRS asked of us has to have at least 5 functional requirements, 5 non functional requirements and 1 constraint. Now I have tried my best to make one however I think there are still a lot of mistakes in it. Could you all please look at it and provide me with some feedback on which parts I can improve or just tell me which parts are plain out wrong and how to make it better? (The project has a maximum of 12 pages so it is a bit long, I will post it below. FR1 Registration of Organizer FR1 describes the registration of an Organizer on CrowdFundum FR1.1 The system shall display a registration form on the website. FR1.2 The system shall require a Name, Username, Document number passport/ID card, Address, Zip code, City, Email address, Telephone number, Bank account, Captcha code on the registration form when a user registers.

    Read the article

  • schema.org specification for generic pages or posts on a CMS

    - by NateWr
    I'm trying to determine the best possible schema.org type to declare for the content section in the template of a content management system, which will handle regular news posts for small, local hospitality businesses. The type should represent the content of that page, which is likely to be a wide range of things. The description for Article pretty strongly encourages its use to be limited to the articles of a publication. For purely semantic reasons, I'm not sure if Blog is appropriate in this case -- businesses won't be creating typical "blog" content but are more likely to be writing about upcoming events, special deals, awards, etc. Would Webpage be appropriate in this instance? Although I'm a fan of the schema.org concept, I frequently find myself unsure how broadly or narrowly I'm meant to infer the meaning of a type. In such cases, is it safe to use a high-level element, such as CreativeWork, or does this blunt the usefulness of the markup?

    Read the article

  • FPS camera specification

    - by user1095108
    I remember I once composed a FPS viewing transformation, as a composition of 3 rotations, each with an angle as a parameter. The first angle specified the left/right rotation around the y-axis, the second angle the up/down rotation around the x-axis, and the third around the z-axis. The viewing transformation was therefore specified by 3 angles. Naturally, this transformation had a gimbal lock, depending in what order the transformation were performed. What should I look at to derive my viewing transformation without the gimbal lock? I know the "lookAt" method already, but I consider that cumbersome. EDIT: MY first guess is to do the first 2 transformations to get a viewing direction and then the axis-angle rotation on this axis.

    Read the article

  • Java EE 7 : les fonctionnalités Cloud reportées, à cause d'un progrès trop lent de la spécification

    Java EE 7 offrira un support étendu du PaaS La plateforme confirme son virage vers le Cloud Mise à jour du 24/06/11, par Hinault Romaric On sait déjà que le prochain Java EE 7 sera très orienté Cloud. La technologie Java pour les applications d'entreprises, dont les spécifications traitent des sujets comme la persistance, le développement et le déploiement d'applications, sera adaptée pour supporter plusieurs modèles de Cloud. Selon les déclarations d'un employé d'Oracle, le prochain JAVA EE aura des capacités permettant une prise en charge du PaaS ((Platform-as-a-service), défini comme la couche intermédiaire en...

    Read the article

  • Creating Entity Framework objects with Unity for Unit of Work/Repository pattern

    - by TobyEvans
    Hi there, I'm trying to implement the Unit of Work/Repository pattern, as described here: http://blogs.msdn.com/adonet/archive/2009/06/16/using-repository-and-unit-of-work-patterns-with-entity-framework-4-0.aspx This requires each Repository to accept an IUnitOfWork implementation, eg an EF datacontext extended with a partial class to add an IUnitOfWork interface. I'm actually using .net 3.5, not 4.0. My basic Data Access constructor looks like this: public DataAccessLayer(IUnitOfWork unitOfWork, IRealtimeRepository realTimeRepository) { this.unitOfWork = unitOfWork; this.realTimeRepository = realTimeRepository; } So far, so good. What I'm trying to do is add Dependency Injection using the Unity Framework. Getting the EF data context to be created with Unity was an adventure, as it had trouble resolving the constructor - what I did in the end was to create another constructor in my partial class with a new overloaded constructor, and marked that with [InjectionConstructor] [InjectionConstructor] public communergyEntities(string connectionString, string containerName) :this() { (I know I need to pass the connection string to the base object, that can wait until once I've got all the objects initialising correctly) So, using this technique, I can happily resolve my entity framework object as an IUnitOfWork instance thus: using (IUnityContainer container = new UnityContainer()) { container.RegisterType<IUnitOfWork, communergyEntities>(); container.Configure<InjectedMembers>() .ConfigureInjectionFor<communergyEntities>( new InjectionConstructor("a", "b")) DataAccessLayer target = container.Resolve<DataAccessLayer>(); Great. What I need to do now is create the reference to the repository object for the DataAccessLayer - the DAL only needs to know the interface, so I'm guessing that I need to instantiate it as part of the Unity Resolve statement, passing it the appropriate IUnitOfWork interface. In the past, I would have just passed the Repository constructor the db connection string, and it would have gone away, created a local Entity Framework object and used that just for the lifetime of the Repository method. This is different, in that I create an Entity Framework instance as an IUnitOfWork implementation during the Unity Resolve statement, and it's that instance I need to pass into the constructor of the Repository - is that possible, and if so, how? I'm wondering if I could make the Repository a property and mark it as a Dependency, but that still wouldn't solve the problem of how to create the Repository with the IUnitOfWork object that the DAL is being Resolved with I'm not sure if I've understood this pattern correctly, and will happily take advice on the best way to implement it - Entity Framework is staying, but Unity can be swapped out if not the best approach. If I've got the whole thing upside down, please tell me thanks

    Read the article

  • ASP.NET MVC ViewModel Pattern

    - by Omu
    EDIT: I made something much better to fill and read data from a view using ViewModels, called it ValueInjecter. http://valueinjecter.codeplex.com/documentation using the ViewModel to store the mapping logic was not such a good idea because there was repetition and SRP violation, but now with the ValueInjecter I have clean ViewModels and dry mapping code I made a ViewModel pattern for editing stuff in asp.net mvc this pattern is usefull when you have to make a form for editing an entity and you have to put on the form some dropdowns for the user to choose some values public class OrganisationViewModel { //paramterless constructor required, cuz we are gonna get an OrganisationViewModel object from the form in the post save method public OrganisationViewModel() : this(new Organisation()) {} public OrganisationViewModel(Organisation o) { Organisation = o; Country = new SelectList(LookupFacade.Country.GetAll(), "ID", "Description", CountryKey); } //that's the Type for whom i create the viewmodel public Organisation Organisation { get; set; } #region DropDowns //for each dropdown i have a int? Key that stores the selected value public IEnumerable<SelectListItem> Country { get; set; } public int? CountryKey { get { if (Organisation.Country != null) { return Organisation.Country.ID; } return null; } set { if (value.HasValue) { Organisation.Country = LookupFacade.Country.Get(value.Value); } } } #endregion } and that's how i use it public ViewResult Edit(int id) { var model = new OrganisationViewModel(organisationRepository.Get(id)); return View(model); } [AcceptVerbs(HttpVerbs.Post)] public ActionResult Edit(OrganisationViewModel model) { organisationRepository.SaveOrUpdate(model.Organisation); return RedirectToAction("Index"); } and the markup <p> <label for="Name"> Name:</label> <%= Html.Hidden("Organisation.ID", Model.Organisation.ID)%> <%= Html.TextBox("Organisation.Name", Model.Organisation.Name)%> <%= Html.ValidationMessage("Organisation.Name", "*")%> </p> <p> ... <label for="CountryKey"> Country:</label> <%= Html.DropDownList("CountryKey", Model.Country, "please select") %> <%= Html.ValidationMessage("CountryKey", "*") %> </p> so tell me what you think about it

    Read the article

  • Refactor Regex Pattern - Java

    - by UK
    Hello All, I have the following aaaa_bb_cc string to match and written a regex pattern like \\w{4}+\\_\\w{2}\\_\\w{2} and it works. Is there any simple regex which can do this same ?

    Read the article

  • Pattern Matching with XSLT

    - by genesis11
    I'm trying to match a pattern into a string in XSLT/XPath using the matches function, as follows: <xsl:when test="matches('awesome','awe')"> ... </xsl:when> However, in both Firefox 3.5.9 and IE8, it doesn't show up. IE8 tells me that "'matches' is not a valid XSLT or XPath function." Is this due to XSLT 2.0 not being supported, and is there a way around this?

    Read the article

  • java filenames filter pattern

    - by Sergey
    Hello, I need to implement File[] files = getFiles( String folderName, String ptrn ); Where ptrn is a command prompt style pattern like "*2010*.txt" I'm familar with FilenameFilter class, but can't implement public boolean accept(File dir, String filename) because String.matches() doesn't accept such patterns. Thanks!

    Read the article

  • Java - is this an idiom or pattern, behavior classes with no state

    - by Berlin Brown
    I am trying to incorporate more functional programming idioms into my java development. One pattern that I like the most and avoids side effects is building classes that have behavior but they don't necessarily have any state. The behavior is locked into the methods but they only act on the parameters passed in. The code below is code I am trying to avoid: public class BadObject { private Map<String, String> data = new HashMap<String, String>(); public BadObject() { data.put("data", "data"); } /** * Act on the data class. But this is bad because we can't * rely on the integrity of the object's state. */ public void execute() { data.get("data").toString(); } } The code below is nothing special but I am acting on the parameters and state is contained within that class. We still may run into issues with this class but that is an issue with the method and the state of the data, we can address issues in the routine as opposed to not trusting the entire object. Is this some form of idiom? Is this similar to any pattern that you use? public class SemiStatefulOOP { /** * Private class implies that I can access the members of the <code>Data</code> class * within the <code>SemiStatefulOOP</code> class and I can also access * the getData method from some other class. * * @see Test1 * */ class Data { protected int counter = 0; public int getData() { return counter; } public String toString() { return Integer.toString(counter); } } /** * Act on the data class. */ public void execute(final Data data) { data.counter++; } /** * Act on the data class. */ public void updateStateWithCallToService(final Data data) { data.counter++; } /** * Similar to CLOS (Common Lisp Object System) make instance. */ public Data makeInstance() { return new Data(); } } // End of Class // Issues with the code above: I wanted to declare the Data class private, but then I can't really reference it outside of the class: I can't override the SemiStateful class and access the private members. Usage: final SemiStatefulOOP someObject = new SemiStatefulOOP(); final SemiStatefulOOP.Data data = someObject.makeInstance(); someObject.execute(data); someObject.updateStateWithCallToService(data);

    Read the article

  • Is scala's cake pattern possible with parametrized components?

    - by Nicolas
    Parametrized components work well with the cake pattern as long as you are only interested in a unique component for each typed component's, example: trait AComponent[T] { val a:A[T] class A[T](implicit mf:Manifest[T]) { println(mf) } } class App extends AComponent[Int] { val a = new A[Int]() } new App Now my application requires me to inject an A[Int] and an A[String], obviously scala's type system doesn't allow me to extends AComponent twice. What is the common practice in this situation ?

    Read the article

  • Command Design Pattern

    - by pchajer
    After reading command design pattern, I have a couple of question - Why we are creating concrete command and receiver object on client. Can't this initialization on invoker class? I think client should create invoker and pass it's request to invoker. Invoker should take care of all the stuff. By doing this, We have less dependency on client. The design of class diagram is totally different from actual design.

    Read the article

  • Rails Tutorial Error with gemspec for "rspec" "annotate" "spork" "ansicolor" [closed]

    - by Chris H
    I'm following the Rails Tutorial by Michael Hartl and I'm getting this error when I run. bundle exec rspec spec/requests/static_pages_spec.rb Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/annotate-2.4.1.beta1.gemspec]: invalid date format in specification: "2011-09-02 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/guard-rspec-0.5.5.gemspec]: invalid date format in specification: "2011-11-20 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/guard-spork-0.3.2.gemspec]: invalid date format in specification: "2011-11-18 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/spork-0.9.0.gemspec]: invalid date format in specification: "2012-01-22 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/term-ansicolor-1.0.7.gemspec]: invalid date format in specification: "2011-10-13 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/annotate-2.4.1.beta1.gemspec]: invalid date format in specification: "2011-09-02 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/guard-rspec-0.5.5.gemspec]: invalid date format in specification: "2011-11-20 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/guard-spork-0.3.2.gemspec]: invalid date format in specification: "2011-11-18 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/spork-0.9.0.gemspec]: invalid date format in specification: "2012-01-22 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/term-ansicolor-1.0.7.gemspec]: invalid date format in specification: "2011-10-13 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/annotate-2.4.1.beta1.gemspec]: invalid date format in specification: "2011-09-02 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/guard-rspec-0.5.5.gemspec]: invalid date format in specification: "2011-11-20 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/guard-spork-0.3.2.gemspec]: invalid date format in specification: "2011-11-18 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/spork-0.9.0.gemspec]: invalid date format in specification: "2012-01-22 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/term-ansicolor-1.0.7.gemspec]: invalid date format in specification: "2011-10-13 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/annotate-2.4.1.beta1.gemspec]: invalid date format in specification: "2011-09-02 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/guard-rspec-0.5.5.gemspec]: invalid date format in specification: "2011-11-20 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/guard-spork-0.3.2.gemspec]: invalid date format in specification: "2011-11-18 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/spork-0.9.0.gemspec]: invalid date format in specification: "2012-01-22 00:00:00.000000000Z" Invalid gemspec in [/Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/specifications/term-ansicolor-1.0.7.gemspec]: invalid date format in specification: "2011-10-13 00:00:00.000000000Z" /Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in `load': cannot load such file -- /Users/chrishuang02/Desktop/rails_projects/first_app/spec/requests/spec/requests/static_pages_spec.rb (LoadError) from /Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in `block in load_spec_files' from /Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in `map' from /Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in `load_spec_files' from /Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:22:in `run' from /Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/gems/rspec-core-2.9.0/lib/rspec/core/runner.rb:69:in `run' from /Users/chrishuang02/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/gems/rspec-core-2.9.0/lib/rspec/core/runner.rb:10:in `block in autorun'

    Read the article

  • Are Promises/A a good event design pattern to implement even in synchronous languages like PHP?

    - by Xeoncross
    I have always kept an eye out for event systems when writing code in scripting languages. Web applications have a history of allowing the user to add plugins and modules whenever needed. In most PHP systems you have a global/singleton event object which all interested parties tie into and wait to be alerted to changes. Event::on('event_name', $callback); Recently more patterns like the observer have been used for things like jQuery. $(el).on('event', callback); Even PHP now has built in classes for it. class Blog extends SplSubject { public function save() { $this->notify(); } } Anyway, the Promises/A proposal has caught my eye. It is designed for asynchronous systems, but I'm wondering if it is also a good design to implement now that even synchronous languages like PHP are changing. Combining Dependency Injection with Promises/A seems it might be the best combination for handling events currently.

    Read the article

  • MVC repository pattern design decision

    - by bradjive
    I have an asp .net MVC application and recently started implementing the repository pattern with a service validation layer, much like this. I've been creating one repository/service for each model that I create. Is this overkill? Instead, should I create one repository/service for each logical business area that provides CRUD for many different models? To me, it seems like I'm either cluttering the project tree with many files or cluttering a class with many methods. 6 one way half dozen the other. Can you think of any good arguments either way?

    Read the article

  • Using a Generic Repository pattern with fluent nHibernate

    - by alex
    I'm currently developing a medium sized application, which will access 2 or more SQL databases, on different sites etc... I am considering using something similar to this: http://mikehadlow.blogspot.com/2008/03/using-irepository-pattern-with-linq-to.html However, I want to use fluent nHibernate, in place of Linq-to-SQL (and of course nHibernate.Linq) Is this viable? How would I go about configuring this? Where would my mapping definitions go etc...? This application will eventually have many facets - from a WebUI, WCF Library and Windows applications / services. Also, for example on a "product" table, would I create a "ProductManager" class, that has methods like: GetProduct, GetAllProducts etc... Any pointers are greatly received.

    Read the article

  • Parametrized Strategy Pattern

    - by ott
    I have several Java classes which implement the strategy pattern. Each class has variable number parameters of different types: interface Strategy { public data execute(data); } class StrategyA implements Strategy { public data execute(data); } class StrategyB implements Strategy { public StrategyB(int paramA, int paramB); public data execute(data); } class StrategyB implements Strategy { public StrategyB(int paramA, String paramB, double paramC); public data execute(data); } Now I want that the user can enter the parameters in some kind of UI. The UI should be chosen at runtime, i.e. the strategies should be independent of it. The parameter dialog should not be monolithic and there should be the possibility to make it behave and look different for each strategy and UI (e.g. console or Swing). How would you solve this problem?

    Read the article

  • myth about factory pattern

    - by leiz
    This has bothered me for awhile, and I have no clues if this is a myth. It seems that a factory pattern can ease the pain of adding a dependency for a class. For example, in a book, it has something like this Suppose that you have a class named Order. Initially it did not depend on anything. Therefore you didn't bother using a factory to create Order objects and you just used plain new to instantiate the objects. However, you now have a requirement that Order has to be created in association with a Customer. There are million places you need to change to add this extra parameter. If only you had de?ned a factory for the Order class, you would have met the new requirement without the same pain. How is this not same pain as adding an extra parameter to the constructor? I mean you would still need to provide an extra argument for the factory and that is also used by million places, right?

    Read the article

  • C# ProgressBar design pattern

    - by MadSeb
    Hi, I'm working on a database upgrader application. The upgrader updates the schema of a database ( adds new columns, renames columns , adds new tables, new views to an existing database by executing SQL statements ). When a user wants to upgrade from version 1.0 to 2.0 , "Upgrader" objects are taken from an object factory and the "Execute" method of each "Upgrader" is called. The GUI of the application has a progress bar and each time an upgrader object performs a SQL statement the progress bar gets incremented. while (!version.Equal(CurrentVersion)) { IUpgrader myUpgrader = UpgraderFactory.GetUpgrader(version); myUpgrader.Execute(UpgradedFile,progressbar); version.Increment(); } My question is very simple : how should the upgrader object communicate with the progressbar. In the code above, the upgrader object is given direct access to the progressbar but I'm wondering if some better way of doing this or better design pattern exists. Regards, Seb

    Read the article

  • makefile pattern rules: single wildcard, multiple instances in prerequisite

    - by johndashen
    Hi all, hopefully this is a basic question about make pattern rules: I want to use a wildcard more than once in a prerequisite for a rule, i.e. in my Makefile I have data/%P1.m: $(PROJHOME)/data/%/ISCAN/%P1.RAW @echo " Writing temporary matlab file for $*" # do something data/%P2.m: $(PROJHOME)/data/%/ISCAN/AGP2.RAW @echo " Writing temporary matlab file for $*" # do something In this example, I try to invoke make when the wildcard % is AG. Both files $(PROJHOME)/data/AG/ISCAN/AGP1.RAW and $(PROJHOME)/data/AG/ISCAN/AGP2.RAW exist. I attempt the following make commands and get this output: [jshen@iLab10 gender-diffs]$ make data/AGP1.m make: *** No rule to make target `data/AGP1.m'. Stop. [jshen@iLab10 gender-diffs]$ make data/AGP2.m Writing temporary matlab file for AG, part 2... [jshen@iLab10 gender-diffs]$ ls data/AG/ISCAN/AG* data/AG/ISCAN/AGP1.RAW data/AG/ISCAN/AGP2.RAW How can I implement multiple instances of the same wildcard in the first make rule?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >