No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
My blood group says all about me " B +ive"
- Interests
- Programming
37 Posted Topics
Re: The warning is not critical. Where are you defining log4j configuration ? i mean in your program or in XML config file or *.properties file ? If asynchronous logging is a requirement, then the xml properties file you have to use. if you are using something like log4j.appender.A2.MaxFileSize=1000KB or something … | |
Re: Declare the array [B][COLOR=#7f0055]int [/B][/COLOR][COLOR=#000000][] arr ;[/COLOR] Get the array size from user like this [CODE] InputStreamReader in = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(in); String size = br.readLine(); [/CODE] Convert the String to int value and initialise the size of array like this [CODE] int i = Integer.parseInt(size); … | |
Re: There are many ways to do it. You can use regular expression etc. Simplest way is to use loop. For eg [CODE]function test() { var str = "This 'is' very 'important' 'topic' to discuss"; for (var i=0; i<str.length && str.indexOf(''') > -1 ; i++){ startNamePos=str.indexOf(''')+1; endNamePos=str.indexOf(''',startNamePos); alert(str.substring(startNamePos,endNamePos)); str = str.replace(str.substring(str.indexOf('''),str.indexOf(''',startNamePos)+1),""); … | |
Hi, I have a web page. In that there is a toggle button to show or hide advanced search options. Below that there is a "IFrame A"(Table). IFrame A conatins "IFrame B" (Table Contents). Based on the toggle switch status, i want to update "IFrame A" size without refreshing the … | |
Re: If i understand your question correctly then you can use "href" tag to do this. | |
Re: You should try adding your executable class (main method) to manifest file. build the jar file again with -M option and you are done. | |
Re: You have to add logic for "y not equal to y1" for non-duplicate values | |
Re: As per my understanding there are 2 types of SSL connection 1) One-Way SSL Authentication URL Outbound SSL Connection here server is responsible for accepting your connection.(it's policies are set to accept connection from anoymous client) 2) Two-Way SSL Authentication URL Outbound SSL Connection In this a Java client performs … | |
Re: Post full algorithm so we can explain you correctly. In the above snippet , if i'm understanding correctly then you are drawing something with this on screen. For that you are assigning coordinates values. 1) In 1st for loop you are setting x-coordinates keeping y constant [code] f(0,0) = d … | |
Re: It will not ask to map virtual host until you don't change in your local machine configuration and Jboss configuration. Did you defined any virtual host for your machine ....? If so, then make changes as i said in my previous post. Post your JBoss XML Configuration file code so … | |
Re: You can do virtual hosting, using this: [code] <?xml version="1.0"?> <!DOCTYPE jboss-web> <jboss-web> <context-root>myapp</context-root> <virtual-host>apphost1</virtual-host> </jboss-web> [/code] And then define hosts in your deploy\jbossweb-tomcat41.sar\META-INF\jboss-service.xml Simply copy the <host name="localhost"></host> tags and contents, and rename "localhost". You can then add unlimitted alias tags. Here's an example: [code] <Host name="osnet"> <Alias>66.74.22.21</Alias> <Alias>mydomain.com</Alias> … | |
Re: Communication Layer using Java is not a good idea. Here you have to actually write code in C (if you are actually writing device driver) and defining the functions prototype in Java. (Using JNI). So your both browser and communication layer will be in java. But there wil be performance … | |
Re: Do you have Scrolling option in your JTable ...? | |
Re: First thing you didn't do anything in your code so that it exit if anybody enter "result > 2" So it loops until 10 times and after that it exit. Replace your existing code with this [CODE] [INDENT][B][COLOR=#7f0055]if[/B][/COLOR] (result == 1) [COLOR=#3f7f5f]// if result 1, [/COLOR][INDENT]passes = passes + 1; … | |
Re: The reason of 2 duplicate lines depends on the person who wrote the program. I don't know what he want to achieve by doing this...!! The reason that it prints"*" 7 times is as follows Initial value i =5; Step 1 ) Called [COLOR=red]quiz(5)[/COLOR] Here 5>1 so called quiz 5 … | |
Re: To remove last element from temp LinkedList use temp.pollLast(). It will retrieves and removes the last element of list and returns null if list is empty. | |
Re: Post the code of your DBConnect class so we can find out the problem. | |
Hi, I'm using AspectJ in my project. There are some problems which i'm facing currently . One of the major issue is " My cross views only show the static join point . Now the problem is there is no gurantee that the join point will match at runtime (ex: … | |
Re: Hi Kashyap, Did you tested the functionality of AspectJ with Web Services ...? I used WSIF demo also but i'm facing various issues .If you have any documents or links pointing to this then please post it here. Thanks | |
Re: You are writing the return type of method as String but where is your return statement in method ...? So you are receiving this error "missing return type" [code] private String generate( int low, int high ) {[INDENT]-[/INDENT] [INDENT]-[/INDENT] [INDENT]return SomeStringValue[/INDENT] } [/code] You didn't called generate method anywhere ....!! … | |
Re: Hi Peter, The problem you faced was due to modification of original values of the object. Since you modified the value by "some" and "any". It prints "some" and "any" all the times. For example As you modifies the value as "some" and "any", now don't add this name object … | |
Re: First wrong thing you are doing is " Using array for this purpose ". java does not allow variable-sized arrays so it would be a wastage of memory. Since your file size would not be fixed. Instead of that you should you arraylist or vector. I will give you an … | |
Re: Hi, What type of application you are working on ? You can use RXTX. And you can download the comm.jar(2.0.3) from sun site since it's generic for all platform. I used this jar for one of my SMS project. I'm not sure whether it will work on WinXp or not … | |
Re: Did you included the driver jar file in your class path ...?Secondly, which class of driver you are using Type2 or Type3 or type 4 ...? If you didn't specified then go to environemnt variable and in classpath variable add the path of your jar file. | |
Re: For example you can do like this. It all depends on your requirments. [code] [B][COLOR=#7f0055]import[/COLOR][/B][COLOR=#000000] java.util.ArrayList;[/COLOR] [COLOR=#7f0055]public [/COLOR][B][COLOR=#7f0055]class[/COLOR][/B][COLOR=#000000] ArrayPass {[/COLOR][INDENT]ArrayList<Integer> [COLOR=#0000c0]arraylist[/COLOR] = [B][COLOR=#7f0055]new[/COLOR][/B] ArrayList<Integer>();[/INDENT] [INDENT][B][COLOR=#7f0055]public[/COLOR][/B] ArrayList<Integer> MyArrayList([B][COLOR=#7f0055]int[/COLOR][/B] [] a1)[/INDENT] [INDENT]{[/INDENT] [INDENT][INDENT][B][COLOR=#7f0055]for[/COLOR][/B](Integer a : a1)[/INDENT][INDENT]{[INDENT][COLOR=#0000c0]arraylist[/COLOR].add(a);[/INDENT][INDENT]System.[I][COLOR=#0000c0]out[/COLOR][/I].println(a);[/INDENT]} [B][COLOR=#7f0055]return[/COLOR][/B] [COLOR=#0000c0]arraylist[/COLOR]; [/INDENT]} [/INDENT] [INDENT][B][COLOR=#7f0055]public[/COLOR][/B] [B][COLOR=#7f0055]static[/COLOR][/B] [B][COLOR=#7f0055]void[/COLOR][/B] main(String [] args)[/INDENT][INDENT]{[INDENT]ArrayPass ap = [B][COLOR=#7f0055]new[/COLOR][/B] ArrayPass(); [/INDENT][INDENT]ArrayList<Integer> a … | |
Re: I'm not able to understand some parts of your code.... If user enters pepperoni and mushroom together then what does it mean ...? Will you put both mushroom and pepperoni together in all the ordered pizza or what ...? I'm assuming that you want to do this. I modified your … | |
Re: Post error message so we can know what type of error you are receiving. If i understand correctly, then for example you can do like this [code] . . . Vector<Map> vs = [B][COLOR=#7f0055]new[/COLOR][/B] Vector<Map>(); [B][COLOR=#7f0055]while[/COLOR][/B](rs.next()) { Map<String,String> v = [B][COLOR=#7f0055]new[/COLOR][/B] HashMap<String,String>(); v.put([COLOR=#2a00ff]"My field 1"[/COLOR],rs.getString([COLOR=#2a00ff]"My field 1"[/COLOR])); v.put([COLOR=#2a00ff]"My field 2"[/COLOR],rs.getString([COLOR=#2a00ff]"My … | |
Re: 1) First thing , why are you using itemStateChanged ....?? Every time you select a item, value of 2 items will be changed. The last item selected and the newly selected item. 2) You can use same actionPerformed method for taht function. Where you want to display the values of … | |
Re: From how much period you are using java ? Did you read the basics of java yet ? | |
Re: To follow up all the left processing after the ok button is clicked you can do like this 1) Define a new function in which you put all the code you want to process after the dialog box is clicked ok. 2) Now in your cierraPopupOk() call the function after … | |
Re: [code]if (b == 0) { continue; } else {[/code] is continue needed ? It will work well without that. | |
Re: [code] PrintService[] services3 = PrintServiceLookup.lookupPrintServices([B][COLOR=#7f0055]null[/COLOR][/B], [B][COLOR=#7f0055]null[/COLOR][/B]); AttributeSet aset3 = [B][COLOR=#7f0055]new[/COLOR][/B] HashAttributeSet(); aset3.add([B][COLOR=#7f0055]new[/COLOR][/B] PrinterName([COLOR=#2a00ff]"my printer name"[/COLOR], [B][COLOR=#7f0055]null[/COLOR][/B])); aset3.add(MediaTray.BOTTOM); services3 = PrintServiceLookup.lookupPrintServices([B][COLOR=#7f0055]null[/COLOR][/B], aset3); PrinterJob pjob = PrinterJob.getPrinterJob(); [/code] try this . it will work | |
Re: Did you created the web.xml file ? Create a file and make entries like this [code] <servlet> <servlet-name>Name of your servlet</servlet-name> <display-name>bla bla</display-name> <servlet-class>Your calss name</servlet-class> </servlet> <servlet-mapping> <servlet-name>Your servlet name</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>[/code] save it in WEB-INF and now start the tomcat. Access the URL [URL]http://localhost:8080/YourServletName[/URL] | |
Re: [code] [B][COLOR=#7f0055]import[/COLOR][/B][COLOR=#000000] java.io.BufferedReader;[/COLOR] [B][COLOR=#7f0055]import[/COLOR][/B][COLOR=#000000] java.io.InputStreamReader;[/COLOR] [B][COLOR=#7f0055]public [/COLOR][/B][B][COLOR=#7f0055]class[/COLOR][/B][COLOR=#000000] BinaryToDecimal {[/COLOR] [B][COLOR=#7f0055]public[/COLOR][/B] [B][COLOR=#7f0055]static[/COLOR][/B] [B][COLOR=#7f0055]void[/COLOR][/B] main(String[] args) { Double DecimalNumber = 0.0; [B][COLOR=#7f0055]int[/COLOR][/B] BinaryDigit; [B][COLOR=#7f0055]int[/COLOR][/B] Power = 0; [B][COLOR=#7f0055]try[/COLOR][/B] { System.[I][COLOR=#0000c0]out[/COLOR][/I].println([COLOR=#2a00ff]"What is the binary number you wish to convert:"[/COLOR]); InputStreamReader in = [B][COLOR=#7f0055]new[/COLOR][/B] InputStreamReader(System.[I][COLOR=#0000c0]in[/COLOR][/I]); BufferedReader br = [B][COLOR=#7f0055]new[/COLOR][/B] BufferedReader(in); String binary2 = br.readLine(); … |
The End.