fields

How can you remove a field from a word document?

Dear reader, I'm working on a project where the user can insert data into a document using fields, document properties and variables. The user also needs to be able to remove the data from the document. So far, I've managed to remove the document property and variable, but I'm not sure how I would go about removing the field (that's alr...

django app fields - copy and paste data

what field in the django models class should be used if the type of data (text/images/html) is unknown? i'm looking for a field that can handle copy and pasted html code, images, text, etc. ...

Properties vs. Fields: Need help grasping the uses of Properties over Fields.

First off, I have read through a list of postings on this topic and I don't feel I have grasped properties because of what I had come to understand about encapsulation and field modifiers (private, public..ect). One of the main aspects of C# that I have come to learn is the importance of data protection within your code by the use of en...

Reading/writing data to server, ftp, or website

Hi, I'm writing an app that will periodically send information out to a remote server, and then get relevant information about other users from that server back to the local database. What's the best way to handle sending out this info (i.e.: XML or binary) and writing it to the remote server. Also, how can I assure that, when 500+ u...

Java classes with dynamic fields

I'm looking for clever ways to build dynamic Java classes, that is classes where you can add/remove fields at runtime. Usage scenario: I have an editor where users should be able to add fields to the model at runtime or maybe even create the whole model at runtime. Some design goals: Type safe without casts if possible for custom code...

drupal theming a view for Customfield: PHP code

I have a view called "contests_slider" with a block display. I'm hiding all fields and using a "Customfield: PHP code" field instead which calls a function called display_front_contests(). In that function, querying the database and building some html and returning it. I'm displaying the output in a block. The problem is Drupal is adding...

Feedback wanted for my first django custom field!

Hi I've created my first custom django field. Its a social security number field (Cpr) following danish syntax. As I'm new to both python and django i would love to get some feedback on the code! import django.forms as f from datetime import datetime import json from django.utils.safestring import mark_safe from django.core.exceptions i...

Wordpress & SQL: Adding a custom field to all posts

I need a SQL query that I can run in PHPmyadmin that adds a custom field (with a value) to all existing posts. Can anyone help? Is this even possible? ...

Wordpress: Change all custom fields to certain value on the fly

Hi, I need to change ALL the custom field field values on the fly for all posts. Have tried using update_post_meta()-function and it works, but i would like this to happen only when i access a certain page or (even better) when clicking a button, maybe with jQuery AJAX. Now it changes the value even if i don't call this page, which I th...

[MS Access 2003 Look up field and modules] Getting the value not the ID

I have a table tblInvestigators which contains a lookup field to display a list of names A grant may have more than 1 investigator. A requirement of my project is to list all investigators in a single cell next to the grant details, so i'd have: Grant A | Name A, Name B, Name C etc. I have a VBA module that concatenates the investiga...

Is there an elegant way to set a default value for a property in c#?

I have read that there are good reasons to use properties instead of fields in c# on SO. So now I want to convert my code from using fields to using properties. For an instance field of a class, I can set a default value. For example: int speed = 100; For the equivalent property, which I think is: int Speed { get; set; } My unders...

Creating sub-nodes in Drupal from a single node form.

I would like to have a special "sub-node" that could be attached to other Drupal nodes, that allows authors to include commentary (from the author, so this isn't a comment node) and sample text, to the parent node. I plan to use the exact same fields for the author commentary and sample text, and to create a view that lists both togethe...

PHP: check if any posted vars are empty - form: all fields required

Is there a simpler function to something like this: if (isset($_POST['Submit'])) { if ($_POST['login'] == "" || $_POST['password'] == "" || $_POST['confirm'] == "" || $_POST['name'] == "" || $_POST['phone'] == "" || $_POST['email'] == "") { echo "error: all fields are required"; } else { echo "proceed..."; } ...

Multiple filter conditions on same field in reporting services

I have a report model in reporting services containing 3 tables: Persons Backgrounds PersonBackgrounds The content of the tables are: Persons (ID, NAME) 1, John Doe 2, Jane Doe Backgrounds (ID, BACKGROUND) 1, Female 2, Male 3, Single 4, Married PersonBackgrounds (PERSONID, BACKGROUNDID) 1, 2 1, 3 If i create a new ...

how can you loop through all fields of an anonymous type.

i want to take a list of anonymous types and export then to excel. I have the code to export to excel if i have the data, but i want to be able write some generic code to: Loop through all of the fields in the anonymous type so i can export it to excel. I would like to keep the ordering if possible as well. ...

wordpress 3.0 php custom fields issue

This worked perfectly in a previous version of wordpress, different site tho. I have a custom field called flash on several wp pages but it keeps defaulting to "printed if results are empty". Any ideas on why this wouldn't work? <?php if ( function_exists('get_post_custom_values') ) { $mykey_values = get_post_custom_values('f...

Search 2 fields in a Drupal content type

Hello. I need a simple search form on my Drupal site but I can't figure out the best way to get it done. Basically I have a content type with a couple of different fields and I want my form to search in both the title and the body and then return a list with the title its picture and the stripped body. I have tried with Views and it wo...

Redirecting to another PHP page, then going back with filled fields

I have been needing a way to, once I redirect to a PHP page to review data, have the ability go back to the original page with the fields filled as they were before redirecting. I can think of several messy ways of doing this but nothing I am willing to do. Is there a standard way of doing this? ...

Wordpress: update all field values?

I want to update all field values (of a custom field) to a specific value. Would like to make it like a function and run it on a specific page or when button is clicked. Possible? ...

Wordpress: Sort Order by Custom Field Numerically

How Can I sort the custom field data numerically which is stored as string. I can't change it into database. query_posts($query_string. '&orderby=meta_value&meta_key=price&order=DESC' ); This is what I am using but it is sorting it as string as this is stored as string as well. Can anyone tell me how can I convert it into numerically...