Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by KeenEyeLearner

  1. Hi If i have a table [ named : TAB1 with columns C1,C2,C3 ] and i want to see the value of the first row only, what would be the query.I know that this works..--> select C1,C2,C3 from (select C1,C2,C3,rownum rn from TAB1) where rn<=1;But this is too long. I tried this, but it did not work. --> select top 1 from TAB1;Any help please......Thanks
  2. No problem mate. I am banging my head on the net.... something will definately come out.
  3. Hi...W3schools is Awsome. I have learnt so much from here and always recommend this site to my friends. Why cant we have the forum link at a place where everybody can find it easily.?w3schools , keep rocking
  4. WOWThats a cool link.... straight solution on a plate....Wish you could find such a solution to my problem at the web services thread at"http://w3schools.invisionzone.com/index.php?showtopic=3476"
  5. HiWell i have Successfully created a web service using Axis in java and am able to access it using a java client [ Thanks a lot to w3schools tutorial ] . What i need to do is create a VB client now. My Question is....1.. Can i access a java web service running on a jboss server with Visual Basic Only? I mean do i need to know .net for accessing the service, won't vb allow me to create such a client [ i still have not tried my hand at . net and am clueless how to code in it. ]If vb is enough, could anyone kindly help me with some steps on how to go ahead with it ( any advice, link, sample code etc ...... anything ).Thank you?
  6. Thanks Skemcin A few more questions regarding the same. I will concentrate on the simple VB problem at hand..Q 1. Will ....(a)The Web service be a java file [ converted to a class ] , having some function int sum(int a, int which will take a & b and return their sum?(b)The VB code create an object of that Java class and call the function sum()?Again i might be asking a stupid question. Please help me understand which Langauge/Technology will be used in creating the Web Service at the server and the Client and how to fit XML in this senario.Thanks again.
  7. dear viswanathWhat do you mean by displaying a calendar in a textbox? Do you mean a date string in a textbox? Do you want to enter date ( dd/mm/yyyy format ) in both the textbox's and then check which one is greater? If thats the problem, then i guess you will have to do some string manipulations. I had a similar problem earlier and i found that javascript does not have any special date manipulation functions ( i guess ).
  8. HiI am absolutely new at web services, but now i have a basic theoretical idea [ read the web services tutorial from w3schools ]. Please ignore my stupidity. My Problem..... I have deployed JBoss Server on my system. To understand web services i want to develop a simple VB application which takes two numbers and gives the sum of the numbers by sending the operands to the server and recieving the result, using web services. Once this is done, based on my understanding i will later get involved in sending database queries to the server, recieving replies [ i understand it will be in xml format ] and interpreting those replies again using web services.( will use VB as frontend )Please help me. I have following questions....1. Can this be done by me if i know vb/jsp/javascript/xml/html fairly enough?2. If No, ( what more do i need to know )?3. If Yes, kindly help me understand what needs to be done in a step by step manner?Thankyou very much
  9. hi, i have just finished coding a calendar in JS. Althoug the output is not so neat [ i was just messing around with the idea ], it will sure give you a lot of hints and a good overview. <html> <head> <title>Calendar</title> <script> var MonthName=new Array('January','February','March','April','May','June','July','August','September','October','November','December','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'); var DayName=new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); function getMonthName(i) { return MonthName[i]; } function generateCal() { var mon =document.getElementById('d1').value; var year=document.getElementById('y1').value; var firstDate=new Date(); firstDate.setDate(1); firstDate.setMonth(mon); firstDate.setYear(year); var mybody=document.getElementsByTagName("fieldset").item(1); mytable = document.createElement("TABLE"); mytablebody = document.createElement("TBODY"); for(j=0;j<6;j++) { mycurrent_row=document.createElement("TR"); for(i=0;i<=6;i++) { mycurrent_cell=document.createElement("TD"); if(j==0) currenttext=document.createTextNode(DayName[i]); else if(firstDate.getDay()==i) { currenttext=document.createTextNode(firstDate.getDate()); firstDate.setDate(firstDate.getDate() + 1); } else currenttext=document.createTextNode(" "); mycurrent_cell.appendChild(currenttext); mycurrent_row.appendChild(mycurrent_cell); } mytablebody.appendChild(mycurrent_row); } mytable.appendChild(mytablebody); mybody.appendChild(mytable); mytable.setAttribute("border","2"); mytable.setAttribute("align","center"); mytable.setAttribute("header","May"); } </script> </head> <body> <form> <fieldset> <legend>Select Month And Year</legend> <center> <select id="d1" name="d1" onchange="generateCal()"> <script> for(i=0;i<=11;i++) document.write("<option value=" + i + ">"+ getMonthName(i) + ""); </script> </select> <select id="y1" name="y1" onchange="generateCal()"> <script> for(i=1980;i<=2008;i++) document.write("<option value=" + i +">"+ i + ""); </script> </select> </center> </fieldset> <fieldset> <legend>Calendar In Java Script By Prabhjot S.L. The KeenEyeLearner</legend> </fieldset> </form> </body> </html> I hope this helps you out.
  10. I tried going through the problem and kindof understood that you were trying to replicate the auto spell feature of microsoft word, where if one types a word, the application automatically corrects it ( if it was wrong and correctable ) or underlines it ( if wrong and uncorrectable and gives many could be correct options ) or does nothing to the word ( if it is correct ).I will take an example of the word : theirTry typing these and hitting return in microsoft word 2003...{1.} their ( nothing happens because it is correct ) {2.} thier ( it changes to their ) ---> you will notice that changing the places of two corrosponding alphabets will result in correction of the word by the application BUT given that neither of them are the first or last alphabets. i.e application will correct the misspelled words tehir and thier because the first and the last alphabets were same and the alphabets between the first and last had just changed places with their neighbour.........[ tehir e&h have changed places ] [ thier i&e have changed places ]. You will also note that if you change first and second alphabets ( t & h and type hteir ), the word will not be corrected because microsoft word assumes that at lease first and last alphabets are correct and in correct position.{3.} ttheir ( the word will be underlined and not corrected ) ---> but thheir will be corrected. So logically microsoft word assumes that the first alphabet should be correct and not duplicated. on the other hand the alphabets between the first and last and the last can be duplicated but the duplicated alphabets have to be side by side i.e. thheir,theeir,theiir and theirr will be corrected.Based on this, i can try to write a application which will { first } check if the word matches directly with the array elements. if not...{ second } assume that alphabet positions have been swapped with their neighbours. Here try swapping the alphabets within the word ( not the first and last alphabet ) with their neighbours and going through first step. example: for the word thier; try step one for [ tiher by swapping i & h ] and [ their by swapping i & e ]. if this too doesent work....{ third } assume that their is duplication of some alphabets ( but not the first one) . So for each duplicate alphabet within the word, remove one and go through first and second steps. Do the same for each duplication. if this doesent work.... give a list of words which have the maximum same number of alphabets and in the same position as the word given.I think i have written too much. But i hope i communicated my idea correctly. Ofcourse i may be wrong and even if i am right the application will use a lot of recursion. Their could be a simpler and fast solution. Kindly correct me where ever you think i am wrong. Today is 17 feb. So how was the terminator?? I am sure you would have come up with a good solution.
  11. I know the array solution ( which you have explained here ) but still thanks for the effort. I am clear on the problem now ( since there is no built in function for formatting dates ). A step ahead for me.....
  12. Well this is a nice problem. Let me present the solution with a small code which can be modified for your problem easily...Here we will transfer three values from one html file ( a.html ) to a second html file ( b.html ) a.html ----------------------3 Values------------------------> b.html*************** Code for a.html *****************<html> <head> <title>a</title> <script> function callB(value1,value2,value3) { var parasite=escape(value1)+","+escape(value2)+","+escape(value3); window.location="b.html?"+parasite; } </script> </head> <body> <h1><b>This Is a.html<b></h1><br><br> Passing These Values To b.html<br> value1="W";<br>value2=3;<br>value3="Schools Online";<br> <a href="java script:callB('W',3,'Schools Online');">Click Here To Pass Values To b.html</a> </body></html>*************** Code for b.html *****************<html> <head> <title>this is b.html</title> </head> <body> <h1><b>This Is b.html<b></h1><br><br><br> Values Passed from a.html are.....<br><br> <script> var parasite=window.location.search; parasite=parasite.substring(1); //removing the ? character //converting the string into array elements. var arrayParasite=parasite.split(','); //unescaping and displaying the result for (i=0;i<arrayParasite.length;i++) { arrayParasite=unescape(arrayParasite); document.write("Value " + (i+1) +" : " +arrayParasite+"<br>"); } </script> </body></html>But of course this is not the best way to do it.
  13. hi. i am a new js programmer and have some problem with date formatting.problem : given an integer between 1 - 12, the program should give the respective month as output.example: input : 5 ---------> output : Mayi tried searching a lot and could not find a function in js that could solve this problem. All i could find was arrays ( with elements being the month names ) being used. Question : Is there such a date formatting function in java script? if yes, which one?
  • Create New...