Deepak Mahalingam

Greenhorn
+ Follow
since Jul 09, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Deepak Mahalingam

you can use the -maxdepth option in 'find' to restrict the level of search. this will thus search only your current directory and perform the action on the zipped files.
14 years ago
A web server will handle the requests in the order which it receives the request. But is there any data structure used to store the requests at the server side, or does the server take the next request only when the current response is sent? Suppose if 'n' requests are sent one by one to the server from the same page, lets says that there are 'n' image tags, then is there any way in which the server temporarily stores the requests before sending the response? It would be of great help if someone can help me out here.
14 years ago
Hi everybody!
I was having a discussion with my friend and he was telling me that JPA is not a framework. His reasoning was that if JPA is a Framework, then where are the classes and implementation for it? JPA is just a specification and different people like ecllipse link, toplink, etc. implement it. It is just a ORM tool.

But as far as I saw in the Oracle website, it says JPA is a framework. So, can somebody throw some light on this whole issue?
document.writeln("<select name='try'>");
for(i=2000;i<2100;i++)
{
document.writeln("<option value="+i+">"+i+"</option>");
}
document.writeln("</select>");

You can create a drop down using DOM, in JS. You can try along similar lines to create a Textfield as well
@Stefan: If posting a reply after 2 months is wrong, I have no idea why the discussion is still open and available:)
Anyway, my idea is not to give the exact solution, rather my idea was to give a hint, or idea so that based on the solution provided, the person can build up further.

your comments like 'line numbers were not needed, ~ searched from home, 'etc. were not very mature. Anyway, I however really loved your point that 'find searches the subdirectories also'. Now, that was a really good point that you had there.
14 years ago
the answer is pretty simple.

just type : find ~ -name "*.gz" -exec zcat {} \; | grep -n "hello"

this will find all the files having the .gz extension from the home directory and the it will execute the zcat command on those files. on that result we can do a grep that will return the line numbers of the pattern "hello". This will surely work.
14 years ago
If you are using some IDE like Eclipse, then it should be a bit easier. You could create some breakpoints in your code and run the code in the debugger mode. This will give you a pretty good idea of how the various controls flow through your code.
14 years ago
yes, not only for SQLException, but for any exception, this holds true. The catch(Exception e) must be last in the series of catch blocks that you might have.
14 years ago
Actually you can do it in JSf using DataTable.

My suggestion is that you can have a data table with two columns...one for the question and one for the options.

The value of your DataTable will be mapped to List of Entities, which contain a Question and a list of options.
something like this:

<h:dataTable border="1" value="#{QuestionBankMB.ClassTest}" var="test" binding="#{QuestionBankMB.dataTable}">

<h:column id="column1">
<f:facet name="header">
<h:outputText value="Question"></h:outputText>
</f:facet>
<h:outputText value="#{test.question}"></h:outputText>
</h:column>

<h:column id="column2">
<f:facet name="header">
<h:outputText value="Memeber Id"></h:outputText>
</f:facet>
<h:selectOneRadio id="selRate" value="#{question.optionSelected}">
<f:selectItems value="#{question.optionsList} />
</h:selectOneRadio>
</h:column>



and bind the datatable to a HTMLDataTable and using the getDataTable().getRowData(), you can get the detail of each row.

I hope this helps.

14 years ago
JSF
I am not sure what you require by a dynamic redirect....
It would be more helpful if you can post the exact senario...like when do you want a redirection...at the start of a event or just when the object is created...or through the backing bean..
14 years ago
JSF
In some ways, Struts and JSF are similar.
That is both make use of a configuration file...In case of Struts it is 'struts-config.xml' ...in case of JSf it becomes 'faces-config.xml'.
Also both make use of the MVC Architecture.
The servlet controller in caseof Struts is 'ActionServlet'...in case of 'JSF' it becomes..'faces-servlet'....
I have found that if you one of them, learning the other will become a piece of cake. And persoanlly I feel that JSF is much better an option then struts, because of the simplicity in configurng web.xml file
14 years ago
JSF
It depends on which tye of 'select' you are talking about.
If it is 'select * from ' then it is not a DML because it does not 'Modify' any data. But 'select .. into' format is considered a DML.
since it is not a transaction, you do not need a commit to get the results. We need not use a transaction commit when we use a select statement.
Hope that helps.
14 years ago