fields

Although not [required] List field shows up as required and Model State is not Valid due to it being null?

I have the following code- View- <% Html.BeginForm(); %> <div> <%= Html.DropDownList("DropDownSelectList", new SelectList( Model.DropDownSelectList, "Value", "Text"))%> Controller- public ActionResult Admin(string apiKey, string userId) { ChallengesAdminViewModel vm = new ChallengesAdminViewModel(); vm.ApiKey = apiKey;...

Custom field question

Newbie Autodidact Question: When I use custom field key/value in loop to to filter output to a sidebar list, there is a long delay between posting the custom fielded page and its appearance on the blog. Why is this ? Here's a snippet of what I'm doing - whether it's proper or not I don't know... I'm sure the switch code is redundant.....

Access 2007 - ole field linked to a jpg file via a field that contains the path

I need help understanding how to link a ole object in a form to retrieve it's object via a field with the path value. Example: strOriginalFullPath contains the path for that record. I would like to link the ole object via the value of that field in that record. ...

Referencing text input fields in CKEditor dialogs

Hi, I've been playing around with this for a couple of weeks now with no success... In a CKEditor dialog, text input fields are renamed with a unique number - e.g. id: 'txtUrl' will become something like id='27_textinput'. How do I reference this? // I feel it should be something like: var myfield = CKEDITOR.instances.myElement.docum...

ASP MVC dynamic fields in editor

I have a form which will include some optional questions that need to asked of the user. In my model it may look like pubic Dictionary<String, String> Questions { get; set; } where the key is the label and value is the text box. How can I create and populate controls for this? I'm new to ASP MVC, but it makes sense that something like...

Per instance dynamic fields django model

I have a model with a JSON field or a link to a CouchDB document. I can currently access the dynamic informaction in a way such as: genericdocument.objects.get(pk=1) == genericdocument.json_field['sample subfield'] instead I would like genericdocument.sample_subfield to maintain compatibility with all the apps the project currently sh...

How can i store several iphone contacts in sqlite3 table

Hi to All, I developed an iPhone app which displays iPhone AddressBook contacts list. I want to add extra fields to the selected contact. Using AddressBook framework,it was not possible.So,i want to attach those values to the "contacts" table of my database. How can i insert those existing contacts into sqlite table(contacts). Pleas...

Iterate through all form fields within a specified DIV tag.

I need to be able to iterate through all the form fields within a specified DIV tag. Basically, any given DIV tag can have multiple form fields (which is easy enough to parse through), but it can also any number of tables or even additional DIV tags (adding additional levels of hierarchical layering). I've written a basic function that...

Populate FILE field with default text

I'm trying to reutilize code that generates FILE fields for use when something is to be added to the database, and grayed out (and disabled) with data already in the database when the item in question is being edited or viewed in detail. However, I can't seem to get the text to fill the field. I'm using this: echo '<input type="file" na...

Creating java class with annotated fields in runtime

The problem is that I need to create in runtime a class like this: public class Foo { @Bar int value0; @Bar int value1; @Bar int value2; .... } with number of fields being decided at runtime. I was looking at Javassist, and there you can create a new class, and add fields to it, but I haven't found a way to annotate those field...

How can I set value to Html hidden fields from asp.net

Hi I have scenario, where there are html hidden fields, the page can be redirected to itself, with parameters, I have sessions too. Now depending on session value I want to set some hidden values, so that it can be picked up from javascript and can do certain operation. But, the problem is I have no idea about how to get/ set values int...

Find duplicates lines based on some delimited fileds on line

Hello, I have a file with lines having some fields delimited by "|". I have to extract the lines that are identical based on some of the fileds (i.e. find lines which contain the same values for fields 1,2,3 12,and 13) Other fields contents have no importance for searching but the whole extracted lines have to be complete. Can anyone ...

Selecting fields in SQL Select statements (Dumbest SQL Question)

Hello all, Here's a dumb question which I can't find an answer to: I have a table which contains 20 fields, a few of which are date/time. I am interested in pulling all the fields. I would like to pull the datetime fields using the to_char function but don't want to individually list out all the other fields. Is there an easy way to do ...

creating instance of labelled fields data type

How do I create an instance of a "labelled fields data type"? data InputData = InputData { events :: [Event], newResources :: [Resource] } myInputData :: InputData myInputData = ??? ...

VB.NET generates properties in the release build

I have a form and i drag and drop a control in VB.NET. I have a line say, private WithEvents radioButton RadioButton Also, I have a handler like, private void click(.....) Handles radioButton.Click { ... } Now, When I build this is .NET 3.5 in release mode, and see the generated code in reflector tool, the code is something li...

In what circumstances are instance variables declared as '_var' in 'use fields' private?

I'm trying to understand the behavior of the fields pragma, which I find poorly documented, regarding fields prefixed with underscores. This is what the documentation has to say about it: Field names that start with an underscore character are made private to the class and are not visible to subclasses. Inherited fields can be overri...

Database MySql design - varchar length for utf8 fields :: 1. password 2. username 3.email

Hi, Most of the times I define varchar(255) length auto. But now I thinking how much varchar length should be best to define for utf8 fields: password username email If this fields should be define less than varchar 255, how much performance it will improve? Thanks ...

Update a field thanks to a subquery based on another field

Hi, I use a MySQL DB, and I would like to update a field in a table based on another. Something like: UPDATE table1 SET field1 = table2.id WHERE field2 IN ( SELECT table2.name FROM table2 ); I know that this query wouldn't work, but here is the idea. Is that even possible to do? Cheers, Nicolas. ...

problems parsing textfile in Matlab, is there a way to allow fields to have multiple lines?

I have a textfile that I am I want to make into a list. I have asked two questions recently about this topic. The problem I keep coming across is that the I want to parse the textfile but the sections are of different length. So I cannot use textscan(fid,'%s %s %s') because the length of each gene varies. I have also had trouble using...

Access to an "upper" instance of a class from another instance of a different class

Hello everyone! I'd like to know if there's a way to access to the class (or its fields) where an object is instantiated. Let's say I have: def Class1: def __init__(self): self.title = "randomTitle" self.anotherField = float() self.class2Field = Class2() and the class whose type will be the class2Field: d...