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...
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.
...
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...
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...
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...
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...
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...
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?
...
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...
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...
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...
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...
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...";
}
...
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 ...
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.
...
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...
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...
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?
...
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?
...
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...