I have to test a web app and its API for UTF-8 strings.
Webapp has a text field and its API has corresponding getter method, I have to make sure UTF-8 will work, how do I do that?
http://stackoverflow.com/questions/1564566/using-jquery-to-add-or-remove-form-elements/
when i click the add link the information in the existing input field disappears.
How do i tell it to retain this information.
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 Friends,
Could anybody help me by giving some good websites that are describing about T-SQL commands. I am a new guy in this field. thanks in advance..
I have enabled taxonomies in the form of Tag, and I would like the tag field to show up below the content when users are editing the page. Where would I make that setting change?
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 thefield 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!
I'm having a coloumn name with varchar field that holds some folder path like "C:\Program Files\Internet Explorer\en-US" .I need to update the root folder name(Program files to profilesNew).Can anyone please help.
I tried with a query
declare @val as varchar(100)
set @val='C:\Program Files\Internet Explorer\en-US'
select substring(@val,charindex(':\',@val),charindex('\',@val))
but not getting the exact answer
C:\Program FilesNew\Internet Explorer\en-US
I'm using the net.sf.json.JSONObject to create some data to be sent to a front end application, and I don't like the ways ts adding quotation marks to every field name.
For example:
myString = new JSONObject().put("JSON", "Hello, World!").toString();
produces the string {"JSON": "Hello, World"}.
What I want it to return is {JSON: "Hello, World"} - without quotes around "JSON". What do I have to do to make that happen?
I am writing a web service that will receive uploads from mobile clients. The data will have 4 or more text fields followed by a large binary field. What is the best standard technology to use for this, as I may make the API public in the future and want to use something that everyone likes. XML? SOAP? Just HTTP and a completely customized payload?
Thanks.
The SolrInstall wiki page lists seven different server / Servlet Containers compatible with Solr:
Tomcat
Jetty
Resin
JBoss
WebSphere
Weblogic
Glassfish
I'm sure that "best" is subjective, so I'll just say my criteria are: easiest to set up, best for search performance with a smallish, infrequently-updated dataset, and with the fewest number of gotchas.
Jetty and Tomcat both have apt-get solr packages, so they're clearly the frontrunners for some. Jetty is used in the demo install, but there's some notes that Jetty has some difficulties handling Unicode in some cases. Tomcat is a common choice but my understanding is that it's not as lightweight and has a lot of features not needed by Solr.
Is it worth considering any of the others? Are there some important pro's and cons I should be aware of?
I'm using Stripes and I am validating the values of a drop down box to ensure the user selects an option.
On initial load all data is present, but once the validation kicks in the form loses the data that was set up in the action bean on load. This includes the original list I am validating against.
I'm simply using in the jsp, and annotating thefield in the action bean as @Validate(required=true).
Am I missing something simple?
Cheers
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 have a model that looks like this:
class Client(models.Model):
name = models.CharField(max_length=100, primary_key=True)
user = models.ForeignKey(User)
class Contract(models.Model):
title = models.CharField(max_length=100, primary_key=True)
start_date = models.DateField()
end_date = models.DateField()
description = models.TextField()
client = models.ForeignKey(Client)
user = models.ForeignKey(User)
How can i configure a django form so that only clients associated with that user show in thefield in the form?
My initial thought was this in my forms.py:
client = forms.ModelChoiceField(queryset=Client.objects.filter(user__username = User.username))
But it didn't work. So how else would I go about it?
I have a field varchar(14) = 20090226115644
I need convert it to - 2009-02-26 11:56:44 (datetime format)
My idea. use cast and convert.. but I allways have errors.
Conversion failed when converting datetime from character string.
I made this, but don`t like it..
SELECT
SUBSTRING(move,1,4) + '-' + SUBSTRING(move,5,2) + '-' + SUBSTRING(move,7,2) + ' ' + SUBSTRING(move,9,2) + ':' + SUBSTRING(move,11,2) + ':'+SUBSTRING(move,13,2) as new --
FROM [Test].[dbo].[container_events]
where move IS not null
Result :2009-02-26 11:56:44
I'm populating a list fromthe DB, and i have a image field in the DB which contains a URL to a image file.
ListAdapter adapter=new SimpleCursorAdapter(this,
R.layout.row, constantsCursor,
new String[] {"title", "subtitle", "image"},
new int[] {R.id.value, R.id.title, R.id.icon});
However, the other fields are populated, but the image remains empty.
Why?
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 got a distance field in my database that stores the distance traveled on a specific route.
I need to select all the distance fields and plus them together, then returning the result from my stored procedure.
How can this be done?
What is the best way to update a Java or GWT program from MySQL. For example, a MySQL database which holds Weather information... updating whenever the weather changes a degree. How would I update a Java / GWT field with each update. Would I use a thread to query every few seconds??
I guess, DAO is thread safe, does not use any class members.
So can it be used without any problem as a private field of a Servlet ? We need only one copy, and
multiple threads can access it simultaneously, so why bother creating a local variable, right?
can anyone reply me, How do convert RSS feed publish date-time(GMT) to UNIX time-stamp using php. I need to store the date into my table with thefield'd data type as TIMESTAMP.
Hi..
Can we define limit of inout in text field i wan that after certain number of character the keyboard should get hide. i should code on which event of textfields or keyboard.
Hi folks,
I have configured the standard "frontpage" view in order to display a list of nodes, just by displaying a field (the banner image).
Unfortunately the URL /frontapge does not return the previewed template, but the same page that would get displayed before the views module was installed.
Help would be much appreciated.
Hello:
I have a note table with columns:
title :string
content :text
rating :integer
and a thinking_sphinx configuration:
define_index do
indexes :title, :sortable => true
indexes :content
end
Then I can search thenotes and assign weights to title and content to define the order or the result:
Note.search "abc", :match_mode => :extended, :field_weights => {
:title => 10,
:content => 3
}
Now I want to assign a weight to the rating column
The type of the rating column is integer. The range of the rating is [1, 2, 3, 4, 5].
Can I just add weight at the :field_weights
:field_weights => {
:title => 10,
:content => 3,
:rating => 5
}
or I need to do something else to make the note which has higer rating display first?
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?