field

Using jQuery:remove() to delete/remove form elements off a page

I'm trying to remove a form element generated through Ajax calls, but when I submit the form and var_dump the POST request, I can still see the form field key=>value. I need to be able to completely remove the field through jQuery in order to validate correctly. ...

Clearing input text feilds when clicked on in Flash (AS 2.0)

I have a problem where I want a text field that by default has the word NAME in it, to become empty when a user clicks on it. The text field has the instance name 'nam' and is inside a movie with the instance name 'input_text'. I've searched around and found samples of code where everyone keeps suggesting this: textboxinstancename.onS...

Validate field with jquery only if checkbox is selected

I have several checkboxes with the same name and the last checkbox is basically "Other" with an empty text field next to it. I'm using jquery validation and I want to make the empty text field required when the checkbox for other is selected. Not sure how to do this with the checboxes all having the same name. Thanks. ...

MySQL field type for a comments field or text area

As the title says, I'm after a good field type for a comments field I have in a table. It will store many characters (as users can continuously add to it) so it's definitely over 255. I looked at longtext but wasn't sure...Also how do I change the field type to accept different characters such as apostrophies. Thanks. ...

How to create a search field like the one in Mail application ?

Hello, I would like to create a search field exactly as the one in Mail application. The field is first hided, and when an user scrolls down, it appears. Could you help me and give some directions where to look for ? Thank you very much in advance. ...

What is the meaning of the TSV and TSER fields in an Ethereal dump?

What is the meaning of the TSV and TSER fields in an Ethereal dump? I tried googling but could not find the answer. ...

How to update the filename of a Django's FileField instance ?

Hello, Here a simple django model: class SomeModel(models.Model): title = models.CharField(max_length=100) video = models.FileField(upload_to='video') I would like to save any instance so that the video's file name would be a valid file name of the title. For example, in the admin interface, I load a new instance with title ...

NHibernate Collection Mapping - Read Only Properties

I have the following class public class Person { private IList<Person> _children; public IEnumerable<Person> Children { get; } public void AddChild(Person child) { // Some business logic and adding to the internal list } } What changes would I have to make for NHibenrate to be able to persist the Child co...

Increment non unique field during SQL insert

I'm not sure how to word this cause I am a little confused at the moment, so bare with me while I attempt to explain, I have a table with the following fields: OrderLineID, OrderID, OrderLine, and a few other unimportant ones. OrderLineID is the primary key and is always unique(which isn't a problem), OrderID is a foreign key that isn...

GetValue on static field inside nested classes.

Hi... I have the following class declared. I need to retreive the class structure and the static values without instanciate it. public class MyClass() { public static string field = "Value"; public class nestedClass() { public static string nestedField = "NestedValue"; } } I've successfuly used GetFields and ...

Can I un-assign (clear) all fields of an instance?

Is there a simple way to clear all fields of an instance from a an instance? I mean, I would like to remove all values assigned to the fields of an instance. ADDED From the main thread I start a window and another thread which controls state of the window (the last thread, for example, display certain panels for a certain period of tim...

MS Word Macro - Numeric field insertion with automatic calculation at end of page

Hi, I am trying to duplicate a feature that exists in Multimate (Ashton Tate) word processor. Yes, the one that hasnt been supported for 20 years! If I can duplicate this one feature I can get all the users off MM and onto Word. The documents they create are billing documents. they consist of a descriptive paragraph of any length o...

Java: Value updates when it shouldn't

Basically I'm trying to create an implementation of simulated annealing for the multidimensional knapsack problem. I'm having a problem getting the system to decide whether or not to accept a state with a lower value. The annealing is controlled with this function: while (this.temp > 0) { System.out.println("Temperature: "+t...

ADD COLUMN to sqlite db IF NOT EXISTS - flex/air sqlite?

I've got a flex/air app I've been working on, it uses a local sqlite database that is created on the initial application start. I've added some features to the application and in the process I had to add a new field to one of the database tables. My questions is how to I go about getting the application to create one new field that is ...

JPA query many to one association

I want to build the following pseudo query Select a From APDU a where a.group.id= :id group is a field in APDU class of the type APDUGroup.class. I just want to get a list of APDUs based on APDUGroup's id. How do i do that using a standard JPA query? UPDATE Yes, I have tried the above query and tried other variations for hours befo...

Is there a way to customize how the value for a custom Model Field is displayed in a template?

I am storing dates as an integer field in the format YYYYMMDD, where month or day is optional. I have the following function for formatting the number: def flexibledateformat(value): import datetime, re try: value = str(int(value)) except: return None match = re.match(r'(\d{4})(\d\d)(\d\d)$',str(value)) ...

Why a "private static" is not seen in a method?

I have a class with the following declaration of the fields: public class Game { private static String outputFileName; .... } I set the value of the outputFileName in the main method of the class. I also have a write method in the class which use the outputFileName. I always call write after main sets value for outputFileName. But wr...

How to access a field's value via reflection (Scala 2.8)

Consider the following code: class Foo(var name: String = "bar") Now i try to get the value and the correct type of it via reflection: val foo = new Foo val field = foo.getClass.getDeclaredField("name") field.setAccessible(true) //This is where it doesn't work val value = field.get(????) I tried things like field.get(foo), but that...

Trying to Nullify Django model fields with method where model and fields are parameters

I'm trying to write a method like the below where a list of fields (a subset of all the fields) is passed in as a parameter and has their column values set to null. I would be happy of I could get a method with just the fields as a parameter like below, but having the model as a parameter would be even better. from my_project.my_app.mo...

SAS: rearrange field order in data step

In SAS 9, how can I in a simple data step, rearrange the order the field. Data set2; /*Something probably goes here*/ set set1; run; So if set1 has the following fields: Name Title Salary A Chief 40000 B Chief 45000 Then I can change the field order of set2 to: Title Salary Name Chief 40000 A Chief 4500...