Search Results

Search found 45031 results on 1802 pages for 'same name'.

Page 80/1802 | < Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >

  • Traceability with XSD

    - by blastthisinferno
    I am trying to let my XML schema handle a little traceability functionality as I'm gathering requirements while I read through some functional specifications. (Not ideal for requirement management, but at least its a start.) What I'm doing is creating a <functionalSpec tag for each functional specification I am currently reading through. I create a <requirement tag for each requirement I find. Since I want to be able to trace where the requirement came from, I create a <trace element with the id of the <functionalSpec element. Instead of allowing myself to enter any plain-old-text in the <functionalSpecId tag, I want the XSD to validate and make sure that I only enter in an id that exists for an existing functional spec. My problem is coming in where it seems the XML Schema W3C Recommendations documentation says that what I want to do is not possible. (about 1/2 way down) {selector} specifies a restricted XPath ([XPath]) expression relative to instances of the element being declared. This must identify a node set of subordinate elements (i.e. contained within the declared element) to which the constraint applies. I'm using Oxygen to create this since I'm fairly new to XSD files, and it gives me the following error: E [Xerces] Identity Constraint error: identity constraint "KeyRef@1045a2" has a keyref which refers to a key or unique that is out of scope. So my question is does anyone know of a way that will allow me to use the same XML structure that I have below through using XSD? Below is the XML file. <?xml version="1.0" encoding="UTF-8" ?> <srs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="srs req2.xsd" xmlns="srs"> <requirements> <requirement DateCreated="2010-06-11" id="1"> <Text>The system shall...</Text> <trace> <functionalSpecId>B010134</functionalSpecId> </trace> <revisions> <revision date="2010-06-11" num="0"> <description>Initial creation.</description> </revision> </revisions> </requirement> </requirements> <functionalSpecs> <functionalSpec id="B010134" model="Model-T"> <trace> <meeting></meeting> </trace> <revisions> <revision date="2009-07-08" num="0"> <description>Initial creation.</description> </revision> <detailer>Me</detailer> <engineer>Me</engineer> </revisions> </functionalSpec> </functionalSpecs> </srs> Below is the XSD file. <?xml version="1.0" encoding="UTF-8" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="srs" xmlns="srs" xmlns:srs="srs" elementFormDefault="qualified"> <!-- SRS --> <xs:element name="srs" type="SRSType"> </xs:element> <xs:complexType name="SRSType"> <xs:sequence> <xs:element ref="requirements" /> <xs:element ref="functionalSpecs" /> </xs:sequence> </xs:complexType> <!-- Requirements --> <xs:element name="requirements" type="RequirementsType"> <xs:unique name="requirementId"> <xs:selector xpath="srs/requirements/requirement" /> <xs:field xpath="@id" /> </xs:unique> </xs:element> <xs:complexType name="RequirementsType"> <xs:choice maxOccurs="unbounded"> <xs:element name="requirement" type="RequirementType" /> </xs:choice> </xs:complexType> <xs:complexType name="RequirementType"> <xs:complexContent> <xs:extension base="RequirementInfo"> <xs:sequence> <xs:element name="trace" type="TraceType" maxOccurs="unbounded" minOccurs="1" /> <xs:element name="revisions" type="RequirementRevisions" /> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="RequirementRevisions"> <xs:sequence> <xs:element name="revision" type="RevisionInfo" minOccurs="1" maxOccurs="unbounded" /> </xs:sequence> </xs:complexType> <xs:complexType name="RequirementInfo"> <xs:sequence> <xs:element name="Text" type="Description" /> </xs:sequence> <xs:attribute name="DateCreated" type="xs:date" use="required" /> <xs:attribute name="id" type="xs:integer" use="required" /> </xs:complexType> <!-- Functional Specs --> <xs:element name="functionalSpecs" type="FunctionalSpecsType"> <xs:unique name="functionalSpecId"> <xs:selector xpath="srs/functionalSpecs/functionalSpec" /> <xs:field xpath="@id" /> </xs:unique> </xs:element> <xs:complexType name="FunctionalSpecsType"> <xs:choice maxOccurs="unbounded"> <xs:element name="functionalSpec" type="FunctionalSpecType" /> </xs:choice> </xs:complexType> <xs:complexType name="FunctionalSpecType"> <xs:complexContent> <xs:extension base="FunctionalSpecInfo"> <xs:sequence> <xs:element name="trace" type="TraceType" maxOccurs="unbounded" minOccurs="1" /> <xs:element name="revisions" type="FunctionalSpecRevisions" /> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="FunctionalSpecRevisions"> <xs:sequence> <xs:element name="revision" type="RevisionInfo" minOccurs="1" maxOccurs="unbounded" /> <xs:element name="detailer" type="xs:string" /> <xs:element name="engineer" type="xs:string" /> </xs:sequence> </xs:complexType> <xs:complexType name="FunctionalSpecInfo"> <xs:attribute name="id" type="xs:string" use="required" /> <xs:attribute name="model" type="xs:string" use="required" /> </xs:complexType> <!-- Requirements, Functional Specs --> <xs:complexType name="TraceType"> <xs:choice> <xs:element name="requirementId"> <xs:keyref refer="requirementId" name="requirementIdRef"> <xs:selector xpath="srs/requirements/requirement" /> <xs:field xpath="@id" /> </xs:keyref> </xs:element> <xs:element name="functionalSpecId"> <xs:keyref refer="functionalSpecId" name="functionalSpecIdRef"> <xs:selector xpath="srs/functionalSpecs/functionalSpec" /> <xs:field xpath="@id" /> </xs:keyref> </xs:element> <xs:element name="meeting" /> </xs:choice> </xs:complexType> <!-- Common --> <xs:complexType name="RevisionInfo"> <xs:choice> <xs:element name="description" type="Description" /> </xs:choice> <xs:attribute name="date" type="xs:date" use="required" /> <xs:attribute name="num" type="xs:integer" use="required" /> </xs:complexType> <xs:complexType name="Description" mixed="true"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="Date" type="xs:date" /> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:schema>

    Read the article

  • Expert F# &ndash; Pattern Matching with Adam and Eve

    - by MarkPearl
    So I am loving my Expert F# book. I wish I had more time with it, but the little time I get I really enjoy. However today I was completely stumped by what the book was trying to get across with regards to pattern matching. On Page 38 – Chapter 3, it briefly describes F# option values. On this page it gives the code snippet along the code lines below and then goes on to speak briefly about pattern matching... open System type 'a option = | None | Some of 'a let people = [ ("Adam", None); ("Eve", None); ("Cain", Some("Adam", "Eve")); ("Abel", Some("Adam", "Eve")) ] let showParents(name, parents) = match parents with | Some(dad, mum) -> printfn "%s has father %s, mother %s" name dad mum | None -> printfn "%s has no parents!" name Console.WriteLine(showParents("Adam", None))   Originally when I read this code I think I misunderstood the purpose of the example code. I for some reason thought that the showParents function would magically be parsing the people array and looking for a match of name and then showing the parents. But obviously it cannot do this since there is no reference to the people array in the showParents method. After rereading the page I realized that I had just combined the two segments of code together, possibly incorrectly, and that a better example would have been to have a code snippet like the following. let showParents(name, parents) = match parents with | Some(dad, mum) -> printfn "%s has father %s, mother %s" name dad mum | None -> printfn "%s has no parents!" name Console.WriteLine(showParents("Adam", None)) Console.WriteLine(showParents("Cain", Some("Adam", "Eve"))) Console.ReadLine()   However, what if I wanted to have a function that was passed a list of people and a name would then show the parents of the name if there were any, and if not would show that they had no parents… so that doesnt seem to difficult does it… lets look at my very unoptimized noob F# code to try and achieve this… open System let people = [ ("Adam", None); ("Eve", None); ("Cain", Some("Adam", "Eve")); ("Abel", Some("Adam", "Eve")) ] // // returns the name of the person // let showName(person : string * (string * string) option) = let name = fst(person) name // // Returns a string with the parents details or not // let showParents(itemData : string * (string * string) option) = let name = fst(itemData) let parents = snd(itemData) match parents with | Some(dad, mum) -> "Father " + dad + " and Mother " + mum | None -> "Has no parents!" // // Prints the details // let showDetails(person : string * (string * string) option) = Console.WriteLine(showName(person)) Console.WriteLine(showParents(person)) // // Check if the name matches the first portion of person // if so, return true, else return false // let nameMatch(name : string , person : string * (string * string) option) = match name with | x when x = fst(person) -> true | _ -> false // // Searches an array of people and looks for a match of names // let findPerson(name : string, people : (string * (string * string) option) list) = let o = Seq.tryFind(fun x -> nameMatch(name, x)) people if Option.isSome o then o else Option.None // // Try and find a person, if found show their details // else show no match // let FoundPerson = findPerson("Cain", people) match FoundPerson with | None -> Console.WriteLine("Not found") | Some(x) -> showDetails(x) Console.ReadLine() So, my code isn’t the cleanest but it did teach me a bit more F#. The area that I learnt about was the option keyword. The challenge being, if a match of the name isn’t found – and if a name is found but the person doesn’t have parents it should react accordingly. I’m pretty sure I can optimize this code quite a bit more and I think I may come back to it sometime in the future and relook at it, but for now at least I was able to achieve what I wanted.. and my brain has gone just that wee little bit more functional.

    Read the article

  • SQL SERVER – Rename Columnname or Tablename – SQL in Sixty Seconds #032 – Video

    - by pinaldave
    We all make mistakes at some point of time and we all change our opinion. There are quite a lot of people in the world who have changed their name after they have grown up. Some corrected their parent’s mistake and some create new mistake. Well, databases are not protected from such incidents. There are many reasons why developers may want to change the name of the column or table after it was initially created. The goal of this video is not to dwell on the reasons but to learn how we can rename the column and table. Earlier I have written the article on this subject over here: SQL SERVER – How to Rename a Column Name or Table Name. I have revised the same article over here and created this video. There is one very important point to remember that by changing the column name or table name one creates the possibility of errors in the application the columns and tables are used. When any column or table name is changed, the developer should go through every place in the code base, ad-hoc queries, stored procedures, views and any other place where there are possibility of their usage and change them to the new name. If this is one followed up religiously there are quite a lot of changes that application will stop working due to this name change.  One has to remember that changing column name does not change the name of the indexes, constraints etc and they will continue to reference the old name. Though this will not stop the show but will create visual un-comfort as well confusion in many cases. Here is my question back to you – have you changed ever column name or table name in production database (after project going live)? If yes, what was the scenario and need of doing it. After all it is just a name. Let me know what you think of this video. Here is the updated script. USE tempdb GO CREATE TABLE TestTable (ID INT, OldName VARCHAR(20)) GO INSERT INTO TestTable VALUES (1, 'First') GO -- Check the Tabledata SELECT * FROM TestTable GO -- Rename the ColumnName sp_RENAME 'TestTable.OldName', 'NewName', 'Column' GO -- Check the Tabledata SELECT * FROM TestTable GO -- Rename the TableName sp_RENAME 'TestTable', 'NewTable' GO -- Check the Tabledata - Error SELECT * FROM TestTable GO -- Check the Tabledata - New SELECT * FROM NewTable GO -- Cleanup DROP TABLE NewTable GO Related Tips in SQL in Sixty Seconds: SQL SERVER – How to Rename a Column Name or Table Name What would you like to see in the next SQL in Sixty Seconds video? Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: Database, Pinal Dave, PostADay, SQL, SQL Authority, SQL in Sixty Seconds, SQL Query, SQL Scripts, SQL Server, SQL Server Management Studio, SQL Tips and Tricks, T SQL, Technology, Video Tagged: Excel

    Read the article

  • How to change Fluent NHibernate reference column name on a HasMany relationship using IHasManyConven

    - by snicker
    Currently I'm using Fluent NHibernate to generate my database schema, but I want the entities in a HasMany relationship to point to a different column for the reference. IE, this is what NHibernate will generate in the creation DDL: alter table `Pony` add index (Stable_ID), add constraint Ponies_Stable foreign key (Stable_Id) references `Stable` (Id); This is what I want to have: alter table `Pony` add index (Stable_ID), add constraint Ponies_Stable foreign key (Stable_Id) references `Stable` (EntityId); Where Stable.ID would be the primary key and Stable.EntityId is just another column that I set. I have a class already that looks like this: public class ForeignKeyReferenceConvention : IHasManyConvention { public void Apply(IOneToManyCollectionInstance instance) { instance.Cascade.All(); //What goes here so that I can change the reference column? } } What do I have to do to get the reference column to change?

    Read the article

  • Rails model belongs to model that belongs to model but i want to use another name

    - by Micke
    Hello. This may be a stupid question but im just starting to learn Rail thats why i am asking thsi question. I have one model called "User" which handles all the users in my community. Now i want to add a guestbook to every user. So i created a model called "user_guestbook" and inserted this into the new model: belongs_to :user and this into the user model: has_one :user_guestbook, :as => :guestbook The next thing i did was to add a new model to handle the posts inside the guestbook. I named it "guestbook_posts" and added this code into the new model: belongs_to :user_guestbook And this into the user_guestbook model: has_many :guestbook_posts, :as => :posts What i wanted to achive was to be able to fetch all the posts to a certain user by: @user = User.find(1) puts @user.guestbook.posts But it doesnt work for me. I dont know what i am doing wrong and if there is any easier way to do this please tell me so. Just to note, i have created some migrations for it to as follows: create_user_guestbook: t.integer :user_id create_guestbook_posts: t.integer :guestbook_id t.integer :from_user t.string :post Thanks in advance!

    Read the article

  • two's complement, why the name "two"

    - by lenatis
    i know unsigned,two's complement, ones' complement and sign magnitude, and the difference between these, but what i'm curious about is: why it's called two's(or ones') complement, so is there a more generalize N's complement? in which way did these genius deduce such a natural way to represent negative numbers?

    Read the article

  • Inheritance with POCO entities in Entity Framework 4

    - by Juvaly
    Hi All, I have a Consumer class and a BillableConsumer : Consumer class. When trying to do any operation on my "Consumers" set, I get the error message "Object mapping could not be found for Type with identity Models.BillableConsumer. From the CSDL: <EntityType Name="BillableConsumer" BaseType="Models.Consumer"> <Property Type="String" Name="CardExpiratoin" Nullable="false" /> <Property Type="String" Name="CardNumber" Nullable="false" /> <Property Type="String" Name="City" Nullable="false" /> <Property Type="String" Name="Country" Nullable="false" /> <Property Type="String" Name="CVV" Nullable="false" /> <Property Type="String" Name="NameOnCard" Nullable="false" /> <Property Type="String" Name="PostalCode" Nullable="false" /> <Property Type="String" Name="State" /> <Property Type="String" Name="StreetAddress" Nullable="false" /> </EntityType> From the C-S: <EntitySetMapping Name="Consumers"> <EntityTypeMapping TypeName="IsTypeOf(Models.Consumer)"> <MappingFragment StoreEntitySet="consumer"> <ScalarProperty Name="LoginID" ColumnName="LoginID" /> <ScalarProperty Name="FirstName" ColumnName="FirstName" /> <ScalarProperty Name="LastName" ColumnName="LastName" /> </MappingFragment> </EntityTypeMapping> <EntityTypeMapping TypeName="IsTypeOf(Models.BillableConsumer)"> <MappingFragment StoreEntitySet="billinginformation"> <ScalarProperty Name="CardExpiratoin" ColumnName="CardExpiratoin" /> <ScalarProperty Name="CardNumber" ColumnName="CardNumber" /> <ScalarProperty Name="City" ColumnName="City" /> <ScalarProperty Name="Country" ColumnName="Country" /> <ScalarProperty Name="CVV" ColumnName="CVV" /> <ScalarProperty Name="LoginID" ColumnName="LoginID" /> <ScalarProperty Name="NameOnCard" ColumnName="NameOnCard" /> <ScalarProperty Name="PostalCode" ColumnName="PostalCode" /> <ScalarProperty Name="State" ColumnName="State" /> <ScalarProperty Name="StreetAddress" ColumnName="StreetAddress" /> </MappingFragment> </EntityTypeMapping> </EntitySetMapping> Is this because I did not specifically add the BillableConsumer entity to the object set? How do I do that in a POCO scenario? Thanks! UPDATE: I decided to test whether or not POCOs generated with the T4 template would solve the problem and they did. The most annoying part is that when I restored my original classes from SVN to try and figure out how they are different - they worked as well!! Not adding this as an answer because someone else might have an actual explanation...

    Read the article

  • The type or namespace name 'UI' cannot be found for using System.Web.UI

    - by user284523
    I am following the tut here http://msdn.microsoft.com/en-us/library/h59db326.aspx # Create an App_Code directory directly under the root directory of your Web site (also called Web application root). # Copy the source file for the control (WelcomeLabel.cs or WelcomeLabel.vb) to the App_Code directory. But I got the error on using System.Web.UI; using System.Web.UI.WebControl; I have tried to add System.Web as Reference but that still doesn't resolve the stuff. I can't see System.Web.UI and System.Web.UI.WebControl in the reference lists is this normal ? Thanks.

    Read the article

  • Please help me understand why my XSL Transform is not transforming

    - by Damovisa
    I'm trying to transform one XML format to another using XSL. Try as I might, I can't seem to get a result. I've hacked away at this for a while now and I've had no success. I'm not even getting any exceptions. I'm going to post the entire code and hopefully someone can help me work out what I've done wrong. I'm aware there are likely to be problems in the xsl I have in terms of selects and matches, but I'm not fussed about that at the moment. The output I'm getting is the input XML without any XML tags. The transformation is simply not occurring. Here's my XML Document: <?xml version="1.0"?> <Transactions> <Account> <PersonalAccount> <AccountNumber>066645621</AccountNumber> <AccountName>A Smith</AccountName> <CurrentBalance>-200125.96</CurrentBalance> <AvailableBalance>0</AvailableBalance> <AccountType>LOAN</AccountType> </PersonalAccount> </Account> <StartDate>2010-03-01T00:00:00</StartDate> <EndDate>2010-03-23T00:00:00</EndDate> <Items> <Transaction> <ErrorNumber>-1</ErrorNumber> <Amount>12000</Amount> <Reference>Transaction 1</Reference> <CreatedDate>0001-01-01T00:00:00</CreatedDate> <EffectiveDate>2010-03-15T00:00:00</EffectiveDate> <IsCredit>true</IsCredit> <Balance>-324000</Balance> </Transaction> <Transaction> <ErrorNumber>-1</ErrorNumber> <Amount>11000</Amount> <Reference>Transaction 2</Reference> <CreatedDate>0001-01-01T00:00:00</CreatedDate> <EffectiveDate>2010-03-14T00:00:00</EffectiveDate> <IsCredit>true</IsCredit> <Balance>-324000</Balance> </Transaction> </Items> </Transactions> Here's my XSLT: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" /> <xsl:param name="currentdate"></xsl:param> <xsl:template match="Transactions"> <xsl:element name="OFX"> <xsl:element name="SIGNONMSGSRSV1"> <xsl:element name="SONRS"> <xsl:element name="STATUS"> <xsl:element name="CODE">0</xsl:element> <xsl:element name="SEVERITY">INFO</xsl:element> </xsl:element> <xsl:element name="DTSERVER"><xsl:value-of select="$currentdate" /></xsl:element> <xsl:element name="LANGUAGE">ENG</xsl:element> </xsl:element> </xsl:element> <xsl:element name="BANKMSGSRSV1"> <xsl:element name="STMTTRNRS"> <xsl:element name="TRNUID">1</xsl:element> <xsl:element name="STATUS"> <xsl:element name="CODE">0</xsl:element> <xsl:element name="SEVERITY">INFO</xsl:element> </xsl:element> <xsl:element name="STMTRS"> <xsl:element name="CURDEF">AUD</xsl:element> <xsl:element name="BANKACCTFROM"> <xsl:element name="BANKID">RAMS</xsl:element> <xsl:element name="ACCTID"><xsl:value-of select="Account/PersonalAccount/AccountNumber" /></xsl:element> <xsl:element name="ACCTTYPE"><xsl:value-of select="Account/PersonalAccount/AccountType" /></xsl:element> </xsl:element> <xsl:element name="BANKTRANLIST"> <xsl:element name="DTSTART"><xsl:value-of select="StartDate" /></xsl:element> <xsl:element name="DTEND"><xsl:value-of select="EndDate" /></xsl:element> <xsl:for-each select="Items/Transaction"> <xsl:element name="STMTTRN"> <xsl:element name="TRNTYPE"><xsl:choose><xsl:when test="IsCredit">CREDIT</xsl:when><xsl:otherwise>DEBIT</xsl:otherwise></xsl:choose></xsl:element> <xsl:element name="DTPOSTED"><xsl:value-of select="EffectiveDate" /></xsl:element> <xsl:element name="DTUSER"><xsl:value-of select="CreatedDate" /></xsl:element> <xsl:element name="TRNAMT"><xsl:value-of select="Amount" /></xsl:element> <xsl:element name="FITID" /> <xsl:element name="NAME"><xsl:value-of select="Reference" /></xsl:element> <xsl:element name="MEMO"><xsl:value-of select="Reference" /></xsl:element> </xsl:element> </xsl:for-each> </xsl:element> <xsl:element name="LEDGERBAL"> <xsl:element name="BALAMT"><xsl:value-of select="Account/PersonalAccount/CurrentBalance" /></xsl:element> <xsl:element name="DTASOF"><xsl:value-of select="EndDate" /></xsl:element> </xsl:element> </xsl:element> </xsl:element> </xsl:element> </xsl:element> </xsl:template> </xsl:stylesheet> Here's my method to transform my XML: public string TransformToXml(XmlElement xmlElement, Dictionary<string, object> parameters) { string strReturn = ""; // Load the XSLT Document XslCompiledTransform xslt = new XslCompiledTransform(); xslt.Load(xsltFileName); // arguments XsltArgumentList args = new XsltArgumentList(); if (parameters != null && parameters.Count > 0) { foreach (string key in parameters.Keys) { args.AddParam(key, "", parameters[key]); } } //Create a memory stream to write to Stream objStream = new MemoryStream(); // Apply the transform xslt.Transform(xmlElement, args, objStream); objStream.Seek(0, SeekOrigin.Begin); // Read the contents of the stream StreamReader objSR = new StreamReader(objStream); strReturn = objSR.ReadToEnd(); return strReturn; } The contents of strReturn is an XML tag (<?xml version="1.0" encoding="utf-8"?>) followed by a raw dump of the contents of the original XML document, stripped of XML tags. What am I doing wrong here?

    Read the article

  • Modify the Event Log Source name for an SSIS package

    - by Paul Kohler
    I have an SSIS package that logs to the Event Log (yes, the event log!) The default "Source" of the log events is "SQLISPackage100" but I want it to be something like "AppName". Event Type: Error Event Source: SQLISPackage100 Event Category: None ... Description: Package "Foo" failed. I hope the answer is simple, but does anyone know how to change the text of the Event Log Source?

    Read the article

  • Set form field values in ExtJS

    - by jeremib
    I'm using ExtJS to create a formPanel: new Ext.FormPanel({ labelAlign: 'top', title: 'Loading Contact...', bodyStyle:'padding:5px', width: 600, autoScroll: true, closable: true, items: [{ layout:'column', border:false, items:[{ columnWidth:.5, layout: 'form', border:false, items: [{ xtype:'textfield', fieldLabel: 'First Name', name: 'first_name', id: 'first_name', anchor:'95%' }, { xtype:'datefield', fieldLabel: 'Birthdate', name: 'birthdate', width: 150, }] },{ columnWidth:.5, layout: 'form', border:false, items: [{ xtype:'textfield', fieldLabel: 'Last Name', name: 'last_name', anchor:'95%' },{ xtype:'textfield', fieldLabel: 'Email', name: 'email', vtype:'email', anchor:'95%' }] }] },{ xtype:'tabpanel', plain:true, activeTab: 0, height:300, /* * By turning off deferred rendering we are guaranteeing that the * form fields within tabs that are not activated will still be * rendered. This is often important when creating multi-tabbed * forms. */ deferredRender: false, defaults:{bodyStyle:'padding:10px'}, items:[{ title:'Address', layout:'form', defaults: {width: 230}, defaultType: 'textfield', items: [{ fieldLabel: 'Line1', name: 'line1', allowBlank:false, },{ fieldLabel: 'Line2', name: 'line2', },{ fieldLabel: 'City', name: 'city', allowBlank: false, },{ xtype:"combo", fieldLabel:"State", name:"state", hiddenName:"combovalue" }, { fieldLabel: 'Zipcode', name: 'zipcode', allowBlank: false, }] },{ title:'Phone Numbers', layout:'form', defaults: {width: 230}, defaultType: 'textfield', items: [{ fieldLabel: 'Home', name: 'home_phone', },{ fieldLabel: 'Cell', name: 'cell_phone' },{ fieldLabel: 'Emergency', name: 'emergency_phone' }] },{ cls:'x-plain', title:'Notes', layout:'fit', items: { xtype:'htmleditor', name:'notes', fieldLabel:'Notes' } }] }], buttons: [{ text: 'Save' },{ text: 'Cancel' }] }) How do I access the form fields by the name to set their value manually? Thanks

    Read the article

  • Tomcat SPNEGO authentication against Active Directory not working.

    - by Michael
    I'm trying to authenticate against AD using the http://spnego.sourceforge.net component with tomcat. I've created my SPN's "setspn.exe -A HTTP/servername SVCTomcat" & "setspn.exe -A HTTP/servername.fqdn.net SVCTomcat" I've created my krb5.conf & login.conf file and setup the filter in the web.xml ie. <filter-name>SpnegoHttpFilter</filter-name> <filter-class>net.sourceforge.spnego.SpnegoHttpFilter</filter-class> <param-name>spnego.allow.unsecure.basic</param-name> <param-value>false</param-value> <param-name>spnego.login.client.module</param-name> <param-value>spnego-client</param-value> <param-name>spnego.krb5.conf</param-name> <param-value>krb5.conf</param-value> <param-name>spnego.login.conf</param-name> <param-value>login.conf</param-value> <param-name>spnego.preauth.username</param-name> <param-value>SVCTomcat</param-value> <param-name>spnego.preauth.password</param-name> <param-value>Pasword</param-value> <param-name>spnego.login.server.module</param-name> <param-value>spnego-server</param-value> <param-name>spnego.prompt.ntlm</param-name> <param-value>false</param-value> <param-name>spnego.logger.level</param-name> <param-value>2</param-value> Note i've stripped extraneous tags from this, so it's not the actual XML. When i go to a page protected by this filter i get this in the catalina logfile. 25-Mar-2010 12:41:26 org.apache.catalina.startup.Catalina start INFO: Server startup in 4615 ms 25-Mar-2010 12:41:47 net.sourceforge.spnego.SpnegoHttpFilter doFilter FINE: principal=SYSTEM@TESTDOMAIN And in the hello_spnego.jsp example on the website it just reports the name of the user tomcat is running as (SYSTEM), not the user i'm connecting with. It seems the author stopped halfway through his debugging page, so i've no areas to look in other than to triple check my config. Any ideas?

    Read the article

  • C#: Regex to extract portions of file name

    - by jakesankey
    I have text files formatted as such: R156484COMP_004A7001_20100104_065119.txt I need to consistently extract the R****COMP, the 004A7001 number, 20100104 (date), and don't care about the 065119 number. the problem is that not ALL of the files being parsed have the exact naming convention. some may be like this: R168166CRIT_156B2075_SU2_20091223_123456.txt or R285476COMP_SU1_125A6025_20100407_123456.txt So how could I use regex instead of split to ensure I am always getting that serial (ex. 004A7001), the date (ex. 20100104), and the R****COMP (or CRIT)??? Here is what I do now but it only gets the files formatted like my first example. if (file.Count(c => c == '_') != 3) continue; and further down in the code I have: string RNumber = Path.GetFileNameWithoutExtension(file); string RNumberE = RNumber.Split('_')[0]; string RNumberD = RNumber.Split('_')[1]; string RNumberDate = RNumber.Split('_')[2]; DateTime dateTime = DateTime.ParseExact(RNumberDate, "yyyyMMdd", Thread.CurrentThread.CurrentCulture); string cmmDate = dateTime.ToString("dd-MMM-yyyy");

    Read the article

  • NHibernate, could not load an entity when column exists in the database.

    - by Eitan
    This is probably a simple question to answer but I just can't figure it out. I have a "Company" class with a many-to-one to "Address" which has a many to one to a composite id in "City". When I load a "Company" it loads the "Address", but if I call any property of "Address" I get the error: {"could not load an entity: [IDI.Domain.Entities.Address#2213][SQL: SELECT address0_.AddressId as AddressId13_0_, address0_.Street as Street13_0_, address0_.floor as floor13_0_, address0_.room as room13_0_, address0_.postalcode as postalcode13_0_, address0_.CountryCode as CountryC6_13_0_, address0_.CityName as CityName13_0_ FROM Address address0_ WHERE address0_.AddressId=?]"} The inner exception is: {"Invalid column name 'CountryCode'.\r\nInvalid column name 'CityName'."} What I don't understand is that I can run the query in sql server 2005 and it works, furthermore both those columns exist in the address table. Here are my HBMs: <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="IDI.Domain" namespace="IDI.Domain.Entities" > <class name="IDI.Domain.Entities.Company,IDI.Domain" table="Companies"> <id column="CompanyId" name="CompanyId" unsaved-value="0"> <generator class="native"></generator> </id> <property column="Name" name="Name" not-null="true" type="String"></property> <property column="NameEng" name="NameEng" not-null="false" type="String"></property> <property column="Description" name="Description" not-null="false" type="String"></property> <property column="DescriptionEng" name="DescriptionEng" not-null="false" type="String"></property> <many-to-one name="Address" column="AddressId" not-null="false" cascade="save-update" class="IDI.Domain.Entities.Address,IDI.Domain"></many-to-one> <property column="Telephone" name="Telephone" not-null="false" type="String"></property> <property column="TelephoneTwo" name="TelephoneTwo" not-null="false" type="String"></property> <property column="Fax" name="Fax" not-null="false" type="String"></property> <property column="ContactMan" name="ContactMan" not-null="false" type="String"></property> <property column="ContactManEng" name="ContactManEng" not-null="false" type="String"></property> <property column="Email" name="Email" not-null="false" type="String"></property> </class> </hibernate-mapping> <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="IDI.Domain" namespace="IDI.Domain.Entities" > <class name="IDI.Domain.Entities.Address,IDI.Domain" table="Address"> <id name="AddressId" column="AddressId" type="Int32"> <generator class="native"></generator> </id> <property name="Street" column="Street" not-null="false" type="String"></property> <property name="Floor" column="floor" not-null="false" type="Int32"></property> <property name="Room" column="room" not-null="false" type="Int32"></property> <property name="PostalCode" column="postalcode" not-null="false" type="string"></property> <many-to-one class="IDI.Domain.Entities.City,IDI.Domain" name="City" update="false" insert="false"> <column name="CountryCode" sql-type="String" ></column> <column name="CityName" sql-type="String"></column> </many-to-one> </class> </hibernate-mapping> <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="IDI.Domain" namespace="IDI.Domain.Entities" > <class name="IDI.Domain.Entities.City,IDI.Domain" table="Cities"> <composite-id> <key-many-to-one class="IDI.Domain.Entities.Country,IDI.Domain" name="CountryCode" column="CountryCode"> </key-many-to-one> <key-property name="Name" column="Name" type="string"></key-property> </composite-id> </class> </hibernate-mapping> Here is my code that calls the Company: IList<BursaUser> user; if(String.IsNullOrEmpty(email) && String.IsNullOrEmpty(company)) return null; ICriteria criteria = Session.CreateCriteria(typeof (BursaUser), "user").CreateCriteria("Company", "comp"); if(String.IsNullOrEmpty(email) || String.IsNullOrEmpty(company) ) { user = String.IsNullOrEmpty(email) ? criteria.Add(Expression.Eq("comp.Name", company)).List<BursaUser>() : criteria.Add(Expression.Eq("user.Email", email)).List<BursaUser>(); } And finally here is where i get the error: "user" was already initialized with the code above: if (user.Company.Address.City == null) user.Company.Address.City = new City(); Thanks.

    Read the article

  • VS 11 Beta Cannot start process because a file name has not been provided

    - by Leniel Macaferi
    This is what I'm getting when I build my Test project: With this I'm unable to run my tests since they're not being discovered by VS. See the message "Unexpected error detected. Check the Tests Output Pane for details." at the window bottom. Now if you look at the Tests OUTPUT pane you'll have no clue about what's the problem. This is extremely helpful... :) I know VS 11 is in beta but it used to work... I've already restarted VS but it didn't work after that too. Any ideas about what's going on? Would it be a bug somewhere? Note: the only thing I can think is related with VS 2010 uninstall I did sometime ago. Maybe it uninstalled some necessary bits. Beats me...

    Read the article

  • ng-grid checkbox with filtering

    - by WilliamLou
    If I have a huge table with ng-grid, and I enabled a checkbox to select all. Is there a way for me to combine this selectAll feature with the filtering box. I mean when I filter out the rows, I want to click the checkbox so that the rows filtered will be all selected; once I clean out filter, those selectedRows are still left so that I can add more rows into it with other filters. I created a Plunker code template here. copy code here as well: // main.js var app = angular.module('myApp', ['ngGrid']); app.controller('MyCtrl', function($scope) { $scope.mySelections = []; $scope.myData = [{name: "Moroni", age: 50}, {name: "Tiancum", age: 43}, {name: "Jacob", age: 27}, {name: "Nephi", age: 29}, {name: "Enos", age: 34}, {name: "Moroni", age: 50}, {name: "Tiancum", age: 43}, {name: "Jacob", age: 27}, {name: "Nephi", age: 29}, {name: "Enos", age: 34}, {name: "Moroni", age: 50}, {name: "Tiancum", age: 43}, {name: "Jacob", age: 27}, {name: "Nephi", age: 29}, {name: "Enos", age: 34}, {name: "Moroni", age: 50}, {name: "Tiancum", age: 43}, {name: "Jacob", age: 27}, {name: "Nephi", age: 29}, {name: "Enos", age: 34},]; $scope.filterOptions = { filterText: '' }; $scope.gridOptions = { data: 'myData', checkboxHeaderTemplate: '<input class="ngSelectionHeader" type="checkbox" ng-model="allSelected" ng-change="toggleSelectAll(allSelected)"/>', showSelectionCheckbox: true, selectWithCheckboxOnly: false, selectedItems: $scope.mySelections, multiSelect: true, filterOptions: $scope.filterOptions }; });

    Read the article

  • Kill process by name in python

    - by user353064
    Hello, I'm trying to kill a process (specifically iChat) using python. I know how to use the command: ps -A | grep iChat Then: kill -9 PID However, I'm not exactly sure how to translate these commands over to python. My guess is that it's not very difficult but I just don't know. Any help would be greatly appreciated!

    Read the article

  • JSLint reports "Unexpected dangling" character in an underscore prefixed variable name

    - by Zhami
    I know that some people consider the presence of a leading underscore to imply that a variable is "private," that such privacy is a fiction, and assume this is why JSLint reports such names with an error message. I use Google Analytics on a Web site I am building. I make reference to GA's variables, such as "_gaq." I am trying to get my JS code to be 100% JSLint clean (I'm not religious about my coding style, and so will go with Mr. Crockford's counsel). That said, I can't do anything about Google's variables names... so, I guess I can't get 100% "clean." I post here in case I've misunderstood the message, and can do something to comply with JSLint practices.

    Read the article

  • Colour Name to RGB/Hex/HSL/HSV etc

    - by Abs
    Hello all, I have come across this great function/command. Colour to RGB, you can do this: col2rgb("peachpuff") //returns hex It will return one hex value. I want to extend this using Perl, Python or PHP but I want to be able to pass in, for example, "yellow" and the function returns all types of yellows - their hex/rgb/?/etc value. I already have a quick solution implemented, which involves mapping colour names to hex values but now I want to get more precise and use some formulas etc to determine what's what. However, as usual, I don't have a clue on how to do this! So I appreciate any implementation advice on how to do this. Thanks all

    Read the article

  • How to make radio button options dependent on other radio button choices using Mootools?

    - by Mike Crittenden
    I have a form where there are 6 items, each of which can be ranked from 1-6 in order of importance. Here's a screenshot. Basically, I need to set it up so that if one item gets a ranking of 3 (for example), then "3" becomes disabled for all the other items. Therefore, the user should only be able to select a number that hasn't already been selected for each item (so we can ensure that the items really will be ranked 1-6 and no numbers will be repeated for different items). Here's the markup I'm working with (minus the presentational divs): <label for="importantProductQuality">Product Quality</label> <input id="importantProductQuality_0" name="importantProductQuality" value="1" type="radio"> <label for="importantProductQuality_0">1</label> <input id="importantProductQuality_1" name="importantProductQuality" value="2" type="radio"> <label for="importantProductQuality_1">2</label> <input id="importantProductQuality_2" name="importantProductQuality" value="3" type="radio"> <label for="importantProductQuality_2">3</label> <input id="importantProductQuality_3" name="importantProductQuality" value="4" type="radio"> <label for="importantProductQuality_3">4</label> <input id="importantProductQuality_4" name="importantProductQuality" value="5" type="radio"> <label for="importantProductQuality_4">5</label> <input id="importantProductQuality_5" name="importantProductQuality" value="6" type="radio"> <label for="importantProductQuality_5">6</label> <label for="importantPrice">Price</label> <input id="importantPrice_0" name="importantPrice" value="1" type="radio"> <label for="importantPrice_0">1</label> <input id="importantPrice_1" name="importantPrice" value="2" type="radio"> <label for="importantPrice_1">2</label> <input id="importantPrice_2" name="importantPrice" value="3" type="radio"> <label for="importantPrice_2">3</label> <input id="importantPrice_3" name="importantPrice" value="4" type="radio"> <label for="importantPrice_3">4</label> <input id="importantPrice_4" name="importantPrice" value="5" type="radio"> <label for="importantPrice_4">5</label> <input id="importantPrice_5" name="importantPrice" value="6" type="radio"> <label for="importantPrice_5">6</label> <label for="importantCustomerService">Customer Service</label> <input id="importantCustomerService_0" name="importantCustomerService" value="1" type="radio"> <label for="importantCustomerService_0">1</label> <input id="importantCustomerService_1" name="importantCustomerService" value="2" type="radio"> <label for="importantCustomerService_1">2</label> <input id="importantCustomerService_2" name="importantCustomerService" value="3" type="radio"> <label for="importantCustomerService_2">3</label> <input id="importantCustomerService_3" name="importantCustomerService" value="4" type="radio"> <label for="importantCustomerService_3">4</label> <input id="importantCustomerService_4" name="importantCustomerService" value="5" type="radio"> <label for="importantCustomerService_4">5</label> <input id="importantCustomerService_5" name="importantCustomerService" value="6" type="radio"> <label for="importantCustomerService_5">6</label> <label for="importantLeadTimes">Lead Times</label> <input id="importantLeadTimes_0" name="importantLeadTimes" value="1" type="radio"> <label for="importantLeadTimes_0">1</label> <input id="importantLeadTimes_1" name="importantLeadTimes" value="2" type="radio"> <label for="importantLeadTimes_1">2</label> <input id="importantLeadTimes_2" name="importantLeadTimes" value="3" type="radio"> <label for="importantLeadTimes_2">3</label> <input id="importantLeadTimes_3" name="importantLeadTimes" value="4" type="radio"> <label for="importantLeadTimes_3">4</label> <input id="importantLeadTimes_4" name="importantLeadTimes" value="5" type="radio"> <label for="importantLeadTimes_4">5</label> <input id="importantLeadTimes_5" name="importantLeadTimes" value="6" type="radio"> <label for="importantLeadTimes_5">6</label> <label for="importantMinimumOrderQuantities">Min Order Quantities</label> <input id="importantMinimumOrderQuantities_0" name="importantMinimumOrderQuantities" value="1" type="radio"> <label for="importantMinimumOrderQuantities_0">1</label> <input id="importantMinimumOrderQuantities_1" name="importantMinimumOrderQuantities" value="2" type="radio"> <label for="importantMinimumOrderQuantities_1">2</label> <input id="importantMinimumOrderQuantities_2" name="importantMinimumOrderQuantities" value="3" type="radio"> <label for="importantMinimumOrderQuantities_2">3</label> <input id="importantMinimumOrderQuantities_3" name="importantMinimumOrderQuantities" value="4" type="radio"> <label for="importantMinimumOrderQuantities_3">4</label> <input id="importantMinimumOrderQuantities_4" name="importantMinimumOrderQuantities" value="5" type="radio"> <label for="importantMinimumOrderQuantities_4">5</label> <input id="importantMinimumOrderQuantities_5" name="importantMinimumOrderQuantities" value="6" type="radio"> <label for="importantMinimumOrderQuantities_5">6</label> <label for="importantAccountManager">Account Manager</label> <input id="importantAccountManager_0" name="importantAccountManager" value="1" type="radio"> <label for="importantAccountManager_0">1</label> <input id="importantAccountManager_1" name="importantAccountManager" value="2" type="radio"> <label for="importantAccountManager_1">2</label> <input id="importantAccountManager_2" name="importantAccountManager" value="3" type="radio"> <label for="importantAccountManager_2">3</label> <input id="importantAccountManager_3" name="importantAccountManager" value="4" type="radio"> <label for="importantAccountManager_3">4</label> <input id="importantAccountManager_4" name="importantAccountManager" value="5" type="radio"> <label for="importantAccountManager_4">5</label> <input id="importantAccountManager_5" name="importantAccountManager" value="6" type="radio"> <label for="importantAccountManager_5">6</label> Any ideas?

    Read the article

  • Two Questions on for Rsync - rsync by date and by file name

    - by paulj3000
    Hi, I have two questions with respect to rsync: 1: I have a bunch of files which are incremented by day of the year. Ex: file.txt.81, file.txt.82, etc. Now, these files are in different directories: data1/file.txt.81 data1/file.txt.82 data2/file2.txt.81 data2/file2.txt.82 How can I have rsync get only the *.82 files and not even touch the other files 2: Now I have a similar data directory structure as above. How can I rsync all files that have been modified on or after a specific day? Thanks

    Read the article

  • trying to pass file name from aspx page to console.exe

    - by ryder1211212
    i want to pass the value of a lable or textbox in an aspx page to a console.exe application such that the if the value is sample.doc it changes to that. i am calling from the aspx page with string f = TextBox1.Text; System.Diagnostics.Process.Start("C:/DocUpload/ConsoleApplication1.exe", f); i have tried converting to string then using the string vatiable inplace of sample.doc but no luck object FileName = System.IO.Path.Combine(ExecutableFileInfo.DirectoryName, "sample.doc"); any help or ideas will be welcomed. thank u

    Read the article

  • get a process id from process name

    - by AJINKYA
    Hi i am trying to do a project using windows API in C language. The small part in my project is to get process ID of lsass.exe. i have tried the program below but it wont work. i have read about the CreateToolhelp32Snapshot, Process32First, Process32Next functions can anyone help me explaining how to use them in the code. So please help me. i am a beginner to windows API so i will appreciate it if anyone can suggest me an good ebook to refer.

    Read the article

< Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >