Code Snippets Interview Questions
Questions Answers Views Company eMail

How to maintain session in Jsp?

IBM,

4 6007

I have this code in leftmenu.ascx page..now on leftmenu.ascx.cs page i want to access id values. but i dont want to check manually like Accommodation,Arts etc.. In cs file my code is like string str[]; //this array contains some values say 10 strings for(i=0;i<100;i++) { if(str[i]==id id.visible=true } i.e.i want to travel for each element of str and each value of id.if they match then id.visible=true how to do?

4071

I have string str="Arts And Props" now i want to replace space in string with null. means i want result as str="ArtsAndProps"

1 3647

How can I create connection two blue-tooth mobile in j2me. please urgent

2057

Code for 1>"ascii to string" 2>"string to ascii"

Aricent, Global Logic,

1 5070

Here's the programm code: int magic(int a, int b) { return b == 0 ? a : magic(b, a % b); } int main() { int a, b; scanf("%d%d", &a, &b); printf("%d\n", magic(a, b)); return 0; } on input stream we have integers 4, 45 What's the output integer? How many times will be initiated "magic" function?

1 3621

given integer number,write a program that displays the number as follows: First line :all digits second line : all except the first digit . . . . Last line : the last digit

8 30823

Write a function which accepts a sentence as input parameter.Each word in that sentence is to be reversed. Space should be there between each words.Return the sentence with reversed words to main function and produce the required output. for eg:- i/p: jack jill jung kill o/p: kcaj llij gnuj llik

Mind Tree,

1 7142

Write a program which has a function and that function should take 2 or 3 or any number of strings and it should return the largest common prefix of all those strings. If there is no common prefix it should return an empty string. for eg:- INPUT OUTPUT glo {glory,glorious,glod} gl {glad,glow} {calendar,phone} empty string

Mind Tree,

2 5691

Write a function which accepts list of nouns as input parameter and return the same list in the plural form. Conditions: i) if last letter is r then append s ii) if word ends with y then replace it by ies iii) call this function in main() and produce the required output. for eg:- if chair is input it should give chairs as output.

Mind Tree,

4194

program to reverse the order of words in a string.

Mind Tree,

2 10177

program to reverse the order of digits in a given number of any length.

Mind Tree,

1 6815

program to check if a number is "perfect number".

Mind Tree, SoftSol,

1 9115

program for addition of fraction(M/N + P/Q = Y/Z)

Mind Tree,

1 5255

program for string reverse(eg:- i am boy -> boy am i)

Black Pepper, Infosys, Mind Tree,

8 18187


Un-Answered Questions { Code Snippets }

How to Check if Folder Exists?

564


How to find the list of users who have two codes su01 and pfcg? thank in advance all.

1829


You have been asked to install a servlet engine (tomcat, glassfish, etc.) for a companies servlets. Assuming the company has an existing web/DBMS server (which may or may not be on the same server), explain in detail how would you implement the development project and a deployment solution.

2265


Coding for .NET Delegates?

2281


Code for Presenting Parent/Child Data in a Data Grid Row?

2281


exception org.apache.jasper.JasperException: java.lang.NullPointerException org.apache.jasper.servlet.JspServletWrapper.handleJs pException(JspServletWrapper.java:491) org.apache.jasper.servlet.JspServletWrapper.service( JspServletWrapper.java:419) org.apache.jasper.servlet.JspServlet.serviceJspFile( JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServ let.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.j ava:717) root cause java.lang.NullPointerException org.apache.struts.taglib.TagUtils.retrieveMessageRes ources(TagUtils.java:1175) org.apache.struts.taglib.TagUtils.message(TagUtils.j ava:1038) org.apache.struts.taglib.bean.MessageTag.doStartTag( MessageTag.java:224) org.apache.jsp.register_jsp._jspx_meth_bean_005fmess age_005f0(register_jsp.java:138) org.apache.jsp.register_jsp._jspService(register_jsp .java:94) org.apache.jasper.runtime.HttpJspBase.service(HttpJs pBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.j ava:717) org.apache.jasper.servlet.JspServletWrapper.service( JspServletWrapper.java:377) org.apache.jasper.servlet.JspServlet.serviceJspFile( JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServ let.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.j ava:717)

3576


how to create a Custom Scrollbar

2234


How to check if Folder is a Special Shell Folder ?

504


find level of following tree (state, parent) " J,D I,D H,C E,B F,B G,C B,A D,A C,A A,& K,E L,E L,F M,F N,G O,H P,I P,H Q,I R,J S,K U,P T,L

2214


Write Down Steps Using SAX Parser

2356


output for printf("printf");

2203


What is full form of PEPSI

2125


how to diplay a external image of output on winxp by using c & c++,

3161


how to create a search bar which access data from various websites and retrieves the data

2725


how to test the orientation of the layout in android.to note any changes in the ui design when change orientation

2685