Search Results

Search found 443 results on 18 pages for 'validates uniqueness of'.

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

  • MVC2 AJAX - determining UpdateTargetId based on the returned data

    - by DanielJW
    The scenario: I'm creating a login form for an MVC2 application. How i'm doing it: The form submits to an MVC2 action which validates the username/password. If it fails validation the action returns the form (a partial view) for the user to try again. If it passes validation the action returns the page the user was visiting before they logged in (a view). What i want to happen: 1 - when the form is submitted and the user validates successfully, The returned result should replace the current page (like what happens if you don't set an UpdateTargetId). 2 - When the form is submitted and the user fails validation, the returned result should replace the form (like what happens if you set the UpdateTargetID to the form's containing element). The problem: I can make both of those things work, but not at the same time. I can either have it always replace the current page, or always just replace the contents of the UpdateTargetId element. But I need it to be able to do either depending on whether the user successfully validated or not. What I need The ideal solution would be to be able to examine the result of the ajax request and determine whether to use the UpdateTargetId (replacing just the form) or not (replacing the whole page). I expect it would involve some work with jquery (assuming it's possible) but i'm not really that great with jquery yet to figure out how to do it myself. If it can't be done this way I'm also open to other methods/solutions for making it work in a similar fashion. Thanks in advance ..

    Read the article

  • Rails Form Submission, User can't be blank

    - by pmanning
    I'm trying to create an event through an event form and I keep getting a form error that says "User can't be blank". The event needs a user_id to post a feed_item showing who created the event. Why can't this event get created? event.rb class Event < ActiveRecord::Base attr_accessible :description, :location, :title, :category_id, :start_date, :start_time, :end_date, :end_time, :image belongs_to :user belongs_to :category has_many :rsvps has_many :users, through: :rsvps, dependent: :destroy mount_uploader :image, ImageUploader validates :title, presence: true, length: { maximum: 60 } validates :user_id, presence: true create_events.rb (database) class CreateEvents < ActiveRecord::Migration def change create_table :events do |t| t.string :title t.date :start_date t.time :start_time t.date :end_date t.time :end_time t.string :location t.string :description t.integer :category_id t.integer :user_id t.timestamps end add_index :events, [:user_id, :created_at] end end events_controller.rb def new @event = Event.new @user = current_user end def create @event = current_user.events.build(params[:event]) if @event.save flash[:success] = "Sesh created!" redirect_to root_url else @feed_items = [] render 'static_pages/home' end end routes.rb SampleApp::Application.routes.draw do resources :users do member do get :following, :followers, :events end end resources :events do member do get :members end end root to: 'static_pages#home' events/new.html.erb <%= form_for @event, :html => {:multipart => true} do |f| %> <%= render 'shared/error_messages', object: @event %>

    Read the article

  • [YYYY].[MM].[DD].[hh][mm] vs. [major].[minor].[revision] [closed]

    - by ef2011
    Possible Duplicate: What “version naming convention” do you use? I am currently debating between the traditional versioning convention [major].[minor].[revision] and my own, almost whimsical, [YYYY].[MM].[DD].[hh][mm] for a new project I am starting. I understand that [major].[minor].[revision] is probably the most popular versioning method on the planet and it is indeed pretty straightforward and reasonable, except that determining which changes merit the label "major", "minor" or even "revision" could be... subjective. A versioning system based on a timestamp is purely non-subjective and guarantees uniqueness. Which one would you choose for your project and why?

    Read the article

  • What's the progress on Haskell records?

    - by mmh
    Recently I stumbled once again on the issues of Haskells records, in particular the uniqueness of field names (it's a pain ...) I already read A proposal for records in Haskell from SPJ and Greg Morrisett but it's last update was 2003. Another paper Lightweight Extensible Records for Haskell from SPJ and Mark Jones is even older: It's from a Haskell workshop in 1999. Now I wonder if the process of giving Haskell new records made any progress. Does anybody know something about it or can point me to some further reading ?

    Read the article

  • RADIUS authentication on Cisco switches: how to assign privilege levels?

    - by Massimo
    I need to configure some Cisco switches (IOS 12.x) to authenticate against a RADIUS server; the server is Windows Server 2003's IAS, and it validates users against his Active Directory domain. I know how to configure the switches to validate usernames/passwords against the RADIUS server, and I can succesfully login using an AD account; the question is: how can I set privilege level 15 for users, in order to not have to use enable each time?

    Read the article

  • SSL certificate only valid when viewed externally

    - by user23522
    We have a SSL certificate installed on our server. When viewed externally it validates correctly, however when the website is viewed from the server it gets an invalid certificate error. We are using the fully qualified domain name to access it for both? Is there any reason this should be happening? Cheers.

    Read the article

  • Legality of using a burned CD with a legal CD-Key?

    - by Luminose
    I have a friend that keeps a collection of burned Windows CD's; 2000, XP, Vista which he uses to repair peoples computers with. Now he justifies this by saying he uses the CD-Key on their OEM sticker that came with their PC. As long as the installation validates the installation should be 100% legal. Is this true? I've always been under the impression you had to use the original CD/DVD that came with the computer. Thanks in advance.

    Read the article

  • SQL conditional row insert

    - by Pablo
    Is it possible to insert a new row if a condition is meet? For example, i have this table with no primary key nor uniqueness +----------+--------+ | image_id | tag_id | +----------+--------+ | 39 | 8 | | 8 | 39 | | 5 | 11 | +----------+--------+ I would like to insert a row if a combination of image_id and tag_id doesn't exists for example; INSERT ..... WHERE image_id!=39 AND tag_id!=8

    Read the article

  • Are GUID primary keys bad in theory, or just practice?

    - by Yarin
    Whenever I design a database I automatically start with an auto-generating GUID primary key for each of my tables (excepting look-up tables) I know I'll never lose sleep over duplicate keys, merging tables, etc. To me it just makes sense philosophically that any given record should be unique across all domains, and that that uniqueness should be represented in a consistent way from table to table. I realize it will never be the most performant option, but putting performance aside, I'd like to know if there are philosophical arguments against this practice?

    Read the article

  • What are the reasons *not* to use a GUID for a primary key?

    - by Yarin
    Whenever I design a database I automatically start with an auto-generating GUID primary key for each of my tables (excepting look-up tables) I know I'll never lose sleep over duplicate keys, merging tables, etc. To me it just makes sense philosophically that any given record should be unique across all domains, and that that uniqueness should be represented in a consistent way from table to table. I realize it will never be the most performant option, but putting performance aside, I'd like to know if there are philosophical arguments against this practice?

    Read the article

  • Meshing different systems of keys together in XML Schema

    - by Tom W
    Hello SO, I'd like to ask people's thoughts on an XSD problem I've been pondering. The system I am trying to model is thus: I have a general type that represents some item in a hypothetical model. The type is abstract and will be inherited by all manner of different model objects, so the model is heterogeneous. Furthermore, some types exist only as children of other types. Objects are to be given an identifier, but the scope of uniqueness of this identifier varies. Some objects - we will call them P (for Parent) objects - must have a globally unique identifier. This is straightforward and can use the xs:key schema element. Other objects (we can call them C objects, for Child) are children of a P object and must have an identifier that is unique only in the scope of that parent. For example, object P1 has two children, object C1 and C2, and object P2 has one child, object C3. In this system, the identifiers given could be as follows: P1: 1 (1st P object globally) P2: 2 (2nd P object globally) C1: 1 (1st C object of P1) C2: 2 (2nd C object of P1) C3: 1 (1st C object of P2) I want the identity syntax of every model object to be identical if possible, therefore my first pass at implementing is to define a single type: <xs:complexType name="ModelElement"> <xs:attribute name="IDMode" type="IdentityMode"/> <xs:attribute name="Identifier" type="xs:string"/> </xs:complexType> where the IdentityMode is an enumerated value: <xs:simpleType name="IdentityMode"> <xs:restriction base="xs:string"> <xs:enumeration value="Identified"/> <xs:enumeration value="Indexed"/> <xs:enumeration value="None"/> </xs:restriction> </xs:simpleType> Here "Identified" signifies a global identifier, and "Indexed" indicates an identifier local only to the parent. My question is, how do I enforce these uniqueness conditions using unique, key or other schema elements based on the IdentityMode property of the given subtype of ModelElement?

    Read the article

  • How to use Groovy Set for unique elements?

    - by Guy
    As simple as this must be I still can't understand where am I wrong: class A { boolean equals(o) { true } } def s = [new A(), new A()] as Set assert s.size() == 1 // Assertion failed: actually gives 2 Which method should I override in order to get uniqueness?

    Read the article

  • Rails forms: render different actions based on validation

    - by Martin Petrov
    Is it possible to render different actions based on what fails at validation? For example - I have one field in the form - email addres. It is validated like this: validates :email, :presence => true, :uniqueness => { :case_sensitive => false } In the controller: def create @user = User.new(params[:user]) if @user.save redirect_to somewhere else # render :new if email is blank # redirect_to somwhere if email is taken end end

    Read the article

  • Oracle VM Templates Enable Oracle Real Application Clusters Deployment Up to 10 Times Faster than VMware vSphere

    - by Angela Poth
    Oracle VM - Quantifying the Value of Application-Driven DeploymentThe recently published report by the Evaluator Group, “Oracle VM – Quantifying The Value of Application-Driven Virtualization,“ validates Oracle’s ease of use and time savings over VMware vSphere 5. The report found that users can deploy Oracle Real Application Clusters up to 10 times faster with Oracle VM templates than VMware vSphere. Using Oracle VM templates users can deploy E-Business Suites nearly 7 times faster than VMware vSphere."Oracle VM’s application-driven architecture was built to enable rapid deployment of enterprise applications, with simplified integrated lifecycle management, to fully support Oracle applications. Our testing has demonstrated 90 percent improvement deploying Oracle Real Application Clusters 11g R2 using Oracle VM Templates and a similar improvement of 85 percent for the Oracle E-Business Suite 12.1.1. This clearly shows that Templates can provide real value to customers and should become an essential component for enabling rapid enterprise application deployment and management," said Leah Schoeb, Senior Partner, Evaluator Group.Read the Press Release Get a copy of the Evaluator Group Report: Oracle VM – Quantifying The Value of Application-Driven Virtualization

    Read the article

  • Stairway to XML: Level 3 - Working with Typed XML

    You can enforce the validation of an XML data type, variable or column by associating it with an XML Schema Collection. SQL Server validates a typed XML value against the rules defined in the schema collection so that INSERT or UPDATE operations will succeed only if the value being inserted or updated is valid as per the rules defined in the Schema Collection. NEW! Deployment Manager Early Access ReleaseDeploy SQL Server changes and .NET applications fast, frequently, and without fuss, using Deployment Manager, the new tool from Red Gate. Try the Early Access Release to get a 20% discount on Version 1. Download the Early Access Release.

    Read the article

  • Single Full Name field in registration form user submits only first what to enter in my backend as last?

    - by Anagio
    On a registration form I have a single input called Full Name. The strings are parsed with http://code.google.com/p/php-name-parser/ so if a person enters their full name middle or any quantity of strings it's handled just fine and the app creates the user in a billing system with it's API. The form validates and checks for two strings in the field otherwise it won't post. I'd like to remove this validation but a last name is required by the API. You cannot post an empty last name to the API. Users are signing up for a trial so I don't want them having to deal with many form fields. The only place the last name shows up visible to the user is in their account settings page. If they end their trial and start a paid plan they'd have to enter their billing details which asks with two fields for their First, Last, and other billing information. What is an alternative to submitting "Doe", "Default", "Empty" in place of them not filling in their last name?

    Read the article

  • What does well written, readable tests look like?

    - by Industrial
    Doing unit testing for the first time at a large scale, I find myself writing a lot of repetitive unit tests for my business logic. Sure, to create complete test suites I need to test all possibilities but readability feels compromised doing what I do - as shown in the psuedocode below. How would a well written, readable test suit look like? describe "UserEntity" -> it "valid name validates" ... it "invalid name doesnt validate" ... it "valid list of followers validate" ..

    Read the article

  • IE7 not digesting JSON: "parse error" [resolved]

    - by Kenny Leu
    While trying to GET a JSON, my callback function is NOT firing. $.ajax({ type:"GET", dataType:'json', url: myLocalURL, data: myData, success: function(returned_data){alert('success');} }); The strangest part of this is that my JSON(s) validates on JSONlint this ONLY fails on IE7...it works in Safari, Chrome, and all versions of Firefox, (EDIT: and even in IE8). If I use 'error', then it reports "parseError"...even though it validates! Is there anything that I'm missing? Does IE7 not process certain characters, data structures (my data doesn't have anything non-alphanumeric, but it DOES have nested JSONs)? I have used tons of other AJAX calls that all work (even in IE7), but with the exception of THIS call. An example data return (EDIT: This is a structurally-complete example, meaning it is only missing a few second-tier fields, but follows this exact hierarchy)here is: {"question":{ "question_id":"19", "question_text":"testing", "other_crap":"none" }, "timestamp":{ "response":"answer", "response_text":"the text here" } } I am completely at a loss. Hopefully someone has some insight into what's going on...thank you! EDIT Here's a copy of the SIMPLEST case of dummy data that I'm using...it still doesn't work in IE7. { "question":{ "question_id":"20", "question_text":"testing :", "adverse_party":"none", "juris":"California", "recipients":"Carl Chan" } } EDIT 2 I am starting to doubt that it is a JSON issue...but I have NO idea what else it could be. Here are some other resources that I've found that could be the cause, but they don't seem to work either: http://firelitdesign.blogspot.com/2009/07/jquerys-getjson.html (Django uses Unicode by default, so I don't think this is causing it) Anybody have any other ideas? ANSWER I finally managed to figure it out...mostly via tedious trial-and-error. I want to thank everyone for their suggestions...as soon as I have 15 rep, I'll upvote you, I promise. :) There was basically no way that you guys could have figured it out, because the issue turned out to be a strange bug between IE7 and Django (my research didn't bring up any similar issues). We were basically using Django template language to generate our JSON...and in the midst of this particular JSON, we were using custom template tags: {% load customfilter %} { "question":{ "question_id":"{{question.id}}", "question_text":"{{question.question_text|customfilterhere}}" } } As soon as I deleted anything related to the customfilter, IE7 was able to parse the JSON perfectly! We still don't have a workaround yet, but at least we now know what's causing it. Has anyone seen any similar issues? Once again, thank you everyone for your contributions.

    Read the article

  • "invalid label" Firebug error with jQuery getJSON

    - by jerome
    Hi all, I'm making a jQuery getJSON request to another domain, so am making sure that my GET URI ends with "callback=?" (i.e. using JSONP). The NET panel shows that I am receiving the data as expected, but for some reason the Console logs the following error: "invalid label". The JSON validates with JSONLint so I doubt that there is anything truly wrong with the structure of the data. Any ideas why I might be receiving this error?

    Read the article

  • New Facebook like button HTML validation

    - by Eric Di Bari
    After adding the new facebook like button to my page, it no longer validates using XHTML strict. The two errors I come across are: 1. All of the "meta property" tags say that "there is no attribute "property"" 2. All of the variables used in the like button line are listed that there are no attributes for it. The line is as follows:

    Read the article

  • Validate subset of a form using jQuery Validate plugin

    - by Andrew Davey
    My HTML form has a number of divs that are the steps of a wizard. Upon clicking a "next" button I want to validate just the active div. I'm using the jQuery.Validate.js plugin. Each div has an ID, so I want a way to say something like: wizardForm.validate().element('#first-step :input') but this only validates the first input, not all of them. How can I validate all inputs within a div?

    Read the article

  • How can I validate the output of XmlSerializer?

    - by Tim Jansen
    In C# / .NET 2.0, when I serialize an object using XmlSerializer, what's the easiest way to validate the output against an XML schema? The problem is that it is all too easy to write invalid XML with the XmlSerializer, and I can't find a way to validate the XML that does not look cumbersome. Ideally I would expect to set the schema in the XmlSerializer or to have a XmlWriter that validates.

    Read the article

  • How do I add the Java Api Documentation to Eclipse?

    - by Kurru
    Hi I have downloaded Java API documentation from http://www.oracle.com/technetwork/java/javase/downloads/index.html#docs and have supposedly attached it to Eclipse using the Window-Preferences-Java-Installed JREs-Edit-"Select rt.jar"-Javadoc Location AND the location has been accepted and "Validates" just fine. However, for the life of me, I can't get Eclipse to show the Javadocs in the tooltip whene I hover over an item (for example in the declaration of an ArrayList). I have also restarted Eclipse in attempts to get it to work what am I doing wrong? Thank you

    Read the article

  • String encryption in C# and Objective c

    - by nbojja
    Hi All, I am building a iPhone app which uses c# web services. My c# web services takes user details and validates against my DB and returns xml files. So Now the issue is how to encrypt user details(username and password are 10chars each) in objective c and decrypt in C#. I am very new to cryptography, which method is the best. will it be possible to encrypt in Objective c and Decrypt in C#. thanks..

    Read the article

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