Zend Form Elemenet addValidators list value [closed] - zend-framework

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
In Zend_Form_Element. I see addValidators(), but not in Zend example, and the book. They only show me about "NotEmpty" , and "EmailAddress".
Also have ->addFilter('StripTags') and "StringTrim" or "Int"
I want to know is there more value for addValidators() & addFilter() (not only "NotEmpty" and "EmailAddress", right?)
But I can't find any link on Zend website.. Their document is hard to use.
Any one give me a list of those values or link to some page I can learn.

You have it also in your project in library/Zend/Validate and library/Zend/Filter

The Reference Guide is the place to be looking for useful information.
See the Standard Validators page from the Zend_Validate section which shows all the built in validation classes you can use, and a similar page for Standard Filters from the Zend_Filter section.
The API Documentation gives you a full outline of all the classes and their methods, but if you are new to ZF it can be hard to find what you are looking for in the API docs. The reference guide is where you will probably be spending a lot of your time reading and learning from examples.
Zend_Form_Element works seamlessly with Zend_Validate classes, so you are able to 0 or more Zend_Validate_* classes to your form elements to validate them against a set of rules instead of manually writing code to validate input.

Related

DOM vs XPath - Difference? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm curious of what the pros and cons are of these two, DOM and XPath. What does XPath provide that DOM does not, and the other way around? I'm not looking for performance or anything like that, just what is the main difference between the two when it comes to navigation? When is DOM better to use than XPath for example?
Thanks.
They are complementary rather than competing. DOM provides a tree model of XML with low-level navigation capability (get first child, get next sibling, etc); XPath adds a much higher-level search and navigation capability (e.g. get the average price of all books, get the title of the last chapter).
Note also that DOM is just one tree model for XML, and is very far from being the best: it's the first and the worst, and it's a shame that so many people still use it. In the Java world there are much better designs available such as JDOM and XOM.

Multiple value field playframework [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
What I need here is a multiple value field like in this tutorial.
Is there another way to do this with Playframework and scala template? If not, how do I get the values in the field once it is populated?
Play and its template system is nothing more than a way for generating required code (in very basic words) so yes it's possible to use this tutorial in Play.
The tutorial you initially pointed contains everything you need, although it doesn't describe required JSON format. Fortunately you can check included demo to see what they are generating with friends.php
Use Firebug or other similar tool to check what requests are sending to the server when you're starting writing in the To: field and also what does it return as a response.
Now only thing you have to do is just create an action in Play which will return data in required format ie:
when it sends a request:
http://somedomain.tld/friends.php?callback=jsonp1350036024256&term=m
it receives the response (names beginning with given term):
jsonp1350036024256([{"name":"Mace Windu"},{"name":"Mon Mothma"}])
How to prepare the JSON in Play's action is described in last section of the JSON document

Javascript Chart that supports Knockout.js [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I've searched for client side javascript chart which supports KO.js but haven't been able to find one.
Has anyone have had any experience with charts that supports KO.js? Reason I'm after KO is that when user toggles the chart parameters, the chart should get rendered automatically for selected parameter.
Have you checked out Wijmo? It includes charts and several other widgets, all with KnockoutJS support:
http://wijmo.com/widgets/mvvm-support/
There's a sample on CodeProject that shows how to build a stock portfolio application using KnockoutJS and the Wijmo line chart widget:
http://www.codeproject.com/Articles/424656/A-Stock-Portfolio-Application-Using-KnockoutJS
You likely won't find that anytime soon; Good charting solutions or libraries in general don't take a stance over which particular application framework to use. In the (segmented) world of JS, one has to write adapters all the time (the most famous one being framework X to JQueryUI widgets); The devs at squareup plugged EmberJs with d3 so I see no reason why one couldn't do the exact same with knockout.
http://corner.squareup.com/2012/04/building-analytics.html

MSHTML tutorial [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I want to learn some basics about MSHTML, like how to use IHtmlDocument and IHtmlDocument2 interfaces. I searched for quite a while, but can not find out a tutorial for beginners. Could anyone recommend something to read?
EDIT: I prefer to use C#.
When I was learning to use MSHTML I mostly relied on the MSDN documentation and asked specific details in newsgroups and sites like this.
It also helped me alot to download the whole Windows SDK instead of reading online.
If you are using C#, then you should not be using MSHTML. Use the WebBrowser component if you're using Windows Forms, use any of the XML APIs if you're trying to generate HTML (as XHTML). You might possibly want to use an HtmlWriter, but stay away from unmanaged code, if you can help it.
Links:
WebBrowser Control (Windows Forms)
HtmlTextWriter Class (System.Web.UI)
http://social.msdn.microsoft.com/Search/en-US/?query=mshtml%20tutorial&ac=1
BTW, MSHTML is not a new thing - it's an old thing.
BTW2, is this the George2?
There are some tutorials under the "hosting and reuse" section of IE SDK documentation. But I guess you need to read the DHTML tutorials under the HTML/CSS section as well.

how to add tag suggestion functionality to my blogware? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I am creating a blogging functionality to my website running on a cms.
My requirement is this:
When a person has written an article, he must automatically provided with 'suggested tags'. These words must come from the article. How can I implement this functionality?
I thought some ideas. Like:
Suggest words which are the longest. Using this, I can filter out 'a', 'of', 'my' etc but not 'because'.
Create a blacklist of words. But I couldn't find any such ready-made list and creating such a list will take a very long time.
So, any other ideas?
You could do Bayesian classification and see what happens. Here's some example code.
UPDATE: This presupposes that you have some tags for the classifier to choose from. Here is a simple algorithm for extracting keywords from text if you need to initialize your list of tags.