Pros and Cons of using regex in Java [closed] - java

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 11 years ago.
Can someone list comprehensive list the pros and cons of using regular expressions in Java programing?

Pro: when regular expressions do what you need.
Con: when they don't.
Other than that, the question as stated is mostly ideological.

Pros:
They are an effective way to match against input.
They are easily configurable and can be separated from code.
Cons:
They be hard to read.
They are not performant. If performance is a concern do not use them.

Pro: It works and it's simple.
Con: There are none.
Why ask? Perhaps you have something more specific you'd like to know?

Related

Website to practice Java coding assignments for interview [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 looking for a website where I could practice Java coding assignments that you often get on job interviews. I mean those tasks where you need to calculate primitive numbers, implement some sorting, or do something with an Array, List or a Map. I'm quite experienced java developer, but such tasks can sometimes be tricky :)
Do you know any free websites that could help?
Thanks.
Go to interviewstreet. Companies often use it as first technical screen

Why Expression Language is preferred over Scriplets? [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.
Folks i keep on hearing that we should use Expression language in JSP instead of scriplets. But nobody gives any
concrete reason behind it. Is readability the only reason behind it? I would like to hear some good reasons for using
EL not scriplets so that i can convince my self and others also.I personally feel using scriplets easier than scriplets probably i have
better control on java than EL.
You want to avoid scriptlets with complex logic (such as conditionals or loops), because that just leads to spaghetti code.
Expression language does not have any of this (it just evaluates expressions).

Java optimizations [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 11 years ago.
There are a number of Java programming practices that I commonly see in use that can be optimized to provide significant speedups.
Example: For lot's of + operations on Strings, use StringBuilder instead.
What are some simple, useful optimizations one can make to potentially improve your program's performance by a significant amount?
EDIT: I'm not looking for trivial premature optimizations. This is not my intention in asking this question. Instead I would like to learn common constructs/mistakes that do constitute a significant performance hit.
Spend at least an order of magnitude more time thinking hard about the most efficient algorithms and data structures for the problem as you do thinking about how to micro-optimize specific operators, control-flow constructs, etc.
See (1)

Is there any good "cube grid" component for Java / Swing? [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.
I need to represent quite some data for which a cube grid would just make perfect sense. Does such a thing exist for Swing?
A "cube grid" looks like this (and it's really darn impressive):
http://www.smartclient.com/smartgwtee/showcase/#cube_analytics
You can try JIDE Pivot table. I think it is pretty close to what you need.
More info at http://www.jidesoft.com/products/pivot.htm
Try out the free and simple Java swing component https://github.com/aristsoft/jpivot to visualize the data in multidimentional view.
It designed just to show the data, so it don't doing the data aggregation any kind itself.

What HTML parsing libraries do you recommend in Java [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.
I want to parse some HTML in order to find the values of some attributes/tags etc.
What HTML parsers do you recommend? Any pros and cons?
NekoHTML, TagSoup, and JTidy will allow you to parse HTML and then process with XML tools, like XPath.
I have tried HTML Parser which is dead simple.
Do you need to do a full parse of the HTML? If you're just looking for specific values within the contents (a specific tag/param), then a simple regular expression might be enough, and could very well be faster.

Categories

Resources