I have added a 'cancelled' field to my model, is there a way to modify the model default query to something like cancelled=False ? without having to modify all my filter/exclude queries ?
how do I load a page in an iframe and set focus to a form element once the page loads? I don't have control over the page I am calling into the iframe, but I know the name of the form is 'form' and the text field I want to focus on is 'go'.
My nested resources are working for form_for updates, but I have a few toggles that I need to setup to change a status field. So I am using link_to, and accessing the url helper.
link_to "toggle", edit_project_expense_path(@project[:id],expense_item[:id])
routes.rb
resources :projects do
resources :expenses
end
match '/submit_expense/:id' => 'expenses#submit_expense', :as => 'submit_expense'
rake routes
edit_project_expense GET /projects/:project_id/expenses/:id/edit(.:format) expenses#edit
My question is: How can I also send along :approval_status = "1", with my link_to?
i am new in this field.i just want to send url while posting or uploadin pictures to the facebook post example for where u would see comment, like,share options...please i don't know about this so please help me.
In yii, i am developing page for Creating Question with multiple options using forms. So i have two tables
Question
QuestionId
Question
optionId
Option
OptionId
Option
To create multiple options, option field should be provided with add button so that after clicking add button, it should display new textbox control to get the new option. All these options displayed in a gridview. So can you please help me. I am very new to yii.
Ok, since this problem has 2 parts, it will be easier to explain them together. So here goes:
I am trying to remove the default decorators from these elements, since I am using a little different way of styling them. But no matter what i do, the DtDDWrapper still shows up. If I try to remove all of the decorators, all of the fields below disappear.
public function newfieldAction() {
$ajaxContext = $this->_helper->getHelper('AjaxContext');
$ajaxContext->addActionContext('newfield', 'html')->initContext();
$id = $this->_getParam('id', null);
$id1=$id+1;
$id2=$id+2;
$element = new Zend_Form_Element_Text("newTitle$id1");
$element->setOptions(array('escape'=>false));
$element->setRequired(true)->setLabel('Vertiba')->removeDecorator('label');
$tinyelement=new Zend_Form_Element_Text("newName$id");
$tinyelement->setRequired(true)->setOptions(array('escape'=>false))->setLabel('Vertiba')->removeDecorator('label');
$textarea_element = new Zend_Form_Element_Textarea("newText$id2");
$textarea_element->setRequired(true)->setOptions(array('escape'=>false))->setLabel('Vertiba')->removeDecorator('label');
$this->view->descriptionField = "<td>".$textarea_element->__toString()."</td>";
$this->view->titleField = $element->__toString();
$this->view->field = $tinyelement->__toString();
$this->view->id=$id;
}
The context view script seams to trim my code in one way or another. When I try to put a <td> or a <table> tag in the view script, it just skips the tags. Is there a way to stop this escaping from happening? My view script:
id; ?"
asdfasdfasdfasd
field ?
titleField ?
descriptionField ?
id ?"remove
P.S. the code formatting system is barfing at me, could someone please help me with the formatting of the code?
Does Zend application server provide any sort of pushed-based messaging architecture support?I mean some different message-oriented middlewares that can be used for the push-based architecture or email support?There is a need in provision of the non web-based interface for certain users of the website who would get regular messages notifying them of different special offers in their field of interest(it should be push-based)
I want to document the default value of an enum typed field:
/// <summary>
/// The default value is <see cref="Orientation.Horizontal" />.
/// </summary>
public Orientation BoxOrientation;
The compiler warns that it couldn't resolve the reference. Prefixing F: or M: silences the compiler, but E: also does, so I'm unsure what prefix is correct.
I have implemented the delegates for UITextField and also method for these text field. Below are the methods:
- (void)textFieldDidBeginEditing:(UITextField *)textField
{
[textField resignFirstResponder];
}
- (BOOL)textFieldShouldReturn:(UITextField *)aTextField
{
[aTextField resignFirstResponder];
return YES;
}
My problem is that when I want to enter text into UITextField its delegate does not allow me to enter the text into textfields. Kindly tell me how i can enter the data into textfields
Hi everyone, this is my question:
I'm migrating data from a Btrieve file (.dat) through Pervasive Control Center and there is field type which is defined as integer but is a date and for example the date '31/12/2009' (seen in the legacy system) is view it as the number 733772 when I export it.
The legacy system shows the date correctly but I can't export it in the same format or at least I can't convert it. Does anybody know how to convert this number through Excel or something?
I have articles table, article_comments.
I want to get the value: last_modified_all of article. I need this value to be the great date of this two:
the last_modified field of articles table.
the last comment of article_comments last_modified column.
Can someone help me? the structure is very simple, and you can guess is without problem.
Hi All:
I want know is there good way to detect Column DataType for Date field (NOT DateTime)?
This what currently I do:
switch (dt.Columns[col].DataType.FullName)
{
case "System.DateTime":
formatedVal = Formatter.GetDateTime(val);
break;
// which is NOT possible, but something equivalent am looking for
case "System.Date":
formatedVal = Formatter.GetDate(val);
break;
default:
formatedVal = val.ToString();
break;
}
Thanks a bunch. :-)
Hi,
I am creating a pdf form in acrobat 9 pro, I would like to add a button so the user can insert an image from their machine. I have been give a pdf where this is possible. How can I create an insert image field in my form?
Is this possibly a livecycle or windows feature? I am on osx
I've found that link: http://code.djangoproject.com/attachment/ticket/8424/time_filters.diff and changed my django 1.2 files by adding taht what you can see there.
But now, when I'm trying to write Entry.objects.filter(pub_date__hour = x) - the result is following error:
Field has invalid lookup: hour
What should I do else, to make it work?
(sorry for my english)
I cannot seem to get this right, I am trying to modify a field to be a foreign key, with cascading delete... what am i doing wrong?
ALTER TABLE my_table ADD CONSTRAINT $4 FOREIGN KEY my_field REFERENCES my_foreign_table ON DELETE CASCADE;
I need to import either csv or excel file into a dbase. The column headers will match but I will want to compare the file against the dbase using an ItemID field, list the rows to be affected and the differences, then allow an update to all the rows with the matching ID.
hi i m using Linq & C# and i want to filter my data as this syntax in Sql
Syntax in sql is
I hav one table name Customer in which name is field
'Select name from customer where name like 'C%''
can u help to solve this code in Linq
in my database , dates are stored in DD-mm-yyyy format , how can i sort this to obtain the earliest date ?
Cursor c = myDb.query(TABLE, new String[]{"dob"}, null, null, null, null, "dob");
I have selected it to order by dob field but its not ordered ...
This is the output for the above query
01-03 17:14:51.595: VERBOSE/ORDER DOB(1431): 01-11-1977
01-03 17:14:51.595: VERBOSE/ORDER DOB(1431): 01-12-1988
01-03 17:14:51.614: VERBOSE/ORDER DOB(1431): 15-01-1977
01-03 17:14:51.656: VERBOSE/ORDER DOB(1431): 31-01-1988
I recently acquired a Metrologic Barcode scanner (USB port), as everyone already knows it works as a keyboard emulator out of the box.
Now my question, how do I configure the scanner and my application, so that my app can process the barcode data directly. That is, I don't want the user to focus on a "Text field" and then process the data when the KeyPress event fires.
I've got an object in my project with circular references. I've put [JsonIgnore] above the field like so:
[JsonIgnore]
public virtual Foobar ChildObject { get; set; }
I'm still getting circular reference errors when I serialize the object. The only fields that do not have JsonIgnore are string fields and should not cause this. Is there something else I need to do to get JsonIgnore to work?
Thanks!
CountIF function in excel , How do I use the same function in
sharepoint Calculated Field.
I want count number of "GO" from Column 1 to Column 12
i.e. Col 1 "GO", Col 2 "GO", Col 3 "No GO", Col 4 "GO": GOs=3
How do I get shortcodes to process properly in custom fields?
I've tried using the code below, but I cannot figure out where to place it ("button" is the name of the field):
<?php
if ( get_post_meta($post->ID, 'button', true) )
echo do_shortcode(get_post_meta($post->ID, 'button', $single = true));
?>
As of now, the shortcode is working in the sense that the button is displaying, but the shortcode text is displaying where the "buy now" button is supposed to be. See screenshot:
http://i.imgur.com/41vsr.png
Hi there,
I am in need of reorganizing a large CSV file. The first column, which is currently a 6 digit number needs to be split up, using comma's as the field separator.
For example, I need this:
022250,10:50 AM,274,22,50
022255,11:55 AM,275,22,55
turned into this:
0,2,2,2,5,0,10:50 AM,274,22,50
0,2,2,2,5,5,11:55 AM,275,22,55
Let me know what you think!
Thanks!
Hello:
I have a simple webpage that displays the credit balance for calling cards. So far without any problems, with HTML, PHP and mysql, I was able to retrieve the balance from a data base. But I have to display the result in ANOTHER PAGE, wich looks akward because the page must reload.
Can I just load this value into a pre-drawed field under the input fields that collect the data from the customer? Such as :
Account Number: 134556
PIN: *
|send|
Balance is: $12.36
Thanks in advanced