fields

How to access class fields of a class that I only know it by its string name ?

For instance, I have a class called "My_Class_X123.java" like this : public class My_Class_X123 // This file was generated by a java program { static String ABC[]={"1","2",...}; int XYZ=0; } When I wrote my program I didn't know there would be a class by this name, but at run time I found out a class by the name of "My_Class_X1...

How to extract fields from a text line that has no constant deliminator?

What is the best way to extract each field from each line where there is no clear separator (deliminator) between each field? Here is a sample of the lines I need to extract its fields: 3/3/2010 11:00:46 AM BASEMENT-IN 3/3/2010 11:04:04 AM 2, YaserAlNaqeb BASEMENT-OUT 3/3/2010 11:04:06 AM ...

Dynamic django forms - Variable fields

I have some models; Vocabularies (tags lists), Labels (tags) and different articles types. These article types have some vocabs enabled, and some not, for instance: Image can tagged with terms from A, B and a news article with terms from A or C. This however only exists at the database level. What i'm trying to do is to output fields ...

Preventing entire JOINed MYSQL query from failing when one field is missing within a WHERE clause

I am doing a couple of joins with a variable in the WHERE clause. I'm not sure if I am doing everything as efficiently as I could, or even using the best practices but my issue is that half my tables have data for when tableC.type=500, and the other half don't resulting in the entire query failing. SELECT tableA.value1 , tableB.value2, ...

PHP contact form overwrite fields issue repeating value

H I'm using php contact form from http://phpfmg.sourceforge.net/home.php. I thought I'd add an onfocus effect so when i click in the fields the value dissappears automatically. But when I submit say if haven't filled in my requried fields I get this the values appearing again like <input type="text" class="text_box" onfocus="if(this.v...

Drupal CC/Views - new fields not showing up in CCK

I am working with CCK/Views for the first time, and I am stuck on a detail... I have created a custom type called Outlet (as in Retail Outlet). I added 5 new fields to my new custom type. I created some content in my new Content Type. Then I went to Views to Add a new "Node" type View for my New Content Type. I click on Fields to sele...

Can fields of the class and arguments of the method interfere?

I have a class with a fields called "a". In the class I have a method and in the list of arguments of this method I also have "a". So, which "a" I will see inside of the method? Will it be the field or it will be the argument of the method? public class myClass { private String a; // Method which sets the value of the field "a". ...

SharePoint 2010: Set field value from query triggered by choice box selection

How do you link a form field to a choicebox selection so that the field's value is set by the information referenced by the ID of the choicebox selection? I have a choicebox in a custom list form which is bound to a "Client" list which contains client names, IDs, reference numbers, addresses, etc. The choicebox displays the client name a...

Comparing two fields in django

Hi can any body suggest me any idea about how can i compare two fields in django. as i have two password fields in my forms.py file. now i want to compare the two fields and if both are same then save the user in database else append an error message to reenter the values again. thanks ...

Making a DateTime field in a database automatic?

I'm putting together a simple test database to learn MVC with. I want to add a DateTime field to show when the record was CREATED. ID = int Name = Char DateCreated = (dateTime, DateTime2..?) I have a feeling that this type of DateTime capture can be done automatically - but that's all I have, a feeling. Can it be done? And if so how?...

Sharepoint custom field type

I have created a custom field type which inherits directly from SPField but when I try to add the field to a list I get the following error: One or more field types are not installed properly. Go to the list settings page to delete these fields. at Microsoft.SharePoint.Library.SPRequestInternalClass.AddField(String bstrUrl, String bs...

How can I print only certain fields in a space separated file?

I have a file containing the following content 1000 line in the following format: abc def ghi gkl How can I write a Perl script to print only the first and the third fields? abc ghi ...

Accessing the shadowed field from enclosed member class (Java)

is it possible to access a shadowed field of an enclosing class from the enclosed one in Java? public class Inherit { public int a = 3; private int b = 5; public class Inheriting { public int a = 23; private int d = 8; public void f() { System.out.println("Here I want to get a = 3");...

How to automatically create Word documents which include list fields from a custom SharePoint list?

Hi, Is it possible to automatically create Word documents which include list fields from a custom SharePoint list? here is the scenario: - custom list (over 100 columns) - Word templates (not sure where is best to store them yet) - Entry Form will provide data for the templates (or partial data, ie Client name, Sales Rep) - a form tha...

Best way to retrieve certain field of all documents returned by a lucen search

Hi, I was wondering what the best way is to retrieve a certain field of all documents returned by a Searcher of Lucene. Background: each document has a date field (written on) and I would like to show a timeline of all found documents, so I need to extract the date (day) field of all the documents I find with the search. I currently r...

Removing a fields from a dynamic ModelForm

In a ModelForm, i have to test user permissions to let them filling the right fields : It is defined like this: class TitleForm(ModelForm): def __init__(self, user, *args, **kwargs): super(TitleForm,self).__init__(*args, **kwargs) choices = ['','----------------'] # company if use...

jQuery changing fields to substring of related field

Another jquery calculation question. I've this, which is sample code from the plugin site that I am playing with to get this working: function recalc(){ $("[id^=total_item]").calc( "qty * price", { qty: $("input[name^=qty_item_]"), price: $("input[name^=price_item_]"), }, fu...

Wordpress custom fields - in each new post showing only first 30 custom fields

Hello, when I adding new post(second post - id=2 ), then showing only first 30 custom field maded in old post( this is first post - id=1, there is about 60 custom fields). Wordpress cannot save all 60 custom fields in next post adding? ...

How to make a Django model fields calculated at runtime?

I have a model: class Person (models.Model): name = models.CharField () birthday = models.DateField () age = models.IntegerField () I want to make age field to behave like a property: def get_age (self): return (datetime.datetime.now() - self.birthday).days // 365 age = property (get_age) but a...

Help matching fields between two classes

I'm not too experienced with Java yet, and I'm hoping someone can steer me in the right direction because right now I feel like I'm just beating my head against a wall... The first class is called MeasuredParams, and it's got 40+ numeric fields (height, weight, waistSize, wristSize - some int, but mostly double). The second class is a ...