choice

What is the difference between ASN.1 enumerated type and choice type?

Can you give me an example to show when to use an enumeration and when to use a choice type with ASN.1? ...

Mootools: How to make cross-browser chose option menu?

Mootools: How to make cross-browser chose option menu? 1 show just selected option 2 onclick on v show all option list (timeout delay) 3 onclick on different option, replace selected option <ul> <li class="selected">A<span>v</span></li> <li>B</li> <li>C</li> <li>D</li> </ul> Thanks very, very much! ...

Python or Ruby Which one should I learn?

I am new to programming.. I was thinking to start learning with Ruby or Python. y main task would be web development. But I cannot choose between them. Which language do you think I should learn? ...

Return a value or modify reference?

I've seen both before, and as far as I know, it's pretty much subjective, but if given the option, which would you do and why? If the data were large, would there be any speed/memory benefit to one of them? function processData(&$data_to_process) { // Pass by reference. // do something to the data } // ... somewhere else $this->p...

XML sequence with arbitrary number of comments

Alright, so I'm using XML schema to validate a following type of xml file: (just pretend the parens are actually angled brackets). <root> <A> <B></B> <C></C> </A> </root> pretty simple -> except the catch is that I also want to have a comment element, which can occur an unbounded number of times in any order (provid...

Hibernate: Better monolithic class or many class maps?

I am making a website with GWT and using Hibernate to connect to the database. Every time a user loads a page and it is required to grab information off the database. Is it better to have monolithic classes containing all the getters/setters for the tables, and select the information as needed, or is it better to have many different cla...

IF Not taking any decision?

Look at this: foreach(Object Item in comboBox1.Items) { if (Convert.ToString(Item) == Convert.ToString(dsGirasol.Tables["DatosGirasol"].Rows[contador][0])) { repetido = true; break; } else { repetido = false; } }​ Note that both of the possible outputs have a messagebox. However when I ...

XSD Required One of Two Attributes?

Hey all, Quick question, i know i can choice elements, so one or the other is required, that's grand. Is it possible to do that with Attributes? Simple sample... <xs:element name="date" minOccurs="1" maxOccurs="unbounded"> <xs:complexType> <xs:choice> <xs:attribute name="monthid" type="id" use="optional" /> <xs:attri...

How to remove the unselected item in a select and radio input in Django

If a model's field is a choice or foreign key, the widget on the page is a select input or radios if you specify that. Django places "---------" in the first item as an unselected value. How can I override it or even remove it? I remember reading the way to do it but can't find it any more. ...

How to choose ArrayList element according to a user choice

I have an ArrayList containing Movies. ArrayList<Movie>movies = new ArrayList<Movie>(); Movie has a property int movienumber. The user can select a movie according to the movienumber, by entering the desired number into the console. I store the users choice inside a field moviechoice. How can I store the user-selected movie in th...

What are A, B, and C in KDIFF merge

Why am I given three choices when merging between my code and someone else's? Shouldn't there just be my code, the other person's code, and the output below? The documentation for KDIFF doesn't help me understand. ...

get elements of xs:choice on XML Beans

I have a schema that looks like <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element name="a" type="a" /> <xs:element name="b" type="b" /> </xs:choice> XML Beans generates the two methods getAArray() and getBArray(), which return A and B elements separately, losing their ordering. I tried to let types a and b extend th...