A few java functions i dont understand.

The following functions i need translated into VB6 i have tried so very hard to this but i cant figure it out so i was hoping the people here on the sun forums could possibly help me i thank anyone who can remotely help me with this problem.
private BitSet a(BitSet bitset)
BitSet bitset1 = new BitSet(64);
boolean flag = false;
for(int i1 = 0; i1 < 64; i1++)
  if(flag != bitset.get(i1))
  bitset1.set(i1);
  flag = bitset.get(i1);
  return bitset1;
  private BitSet a(char ac[])
  int i1 = ac.length * 8;
  BitSet bitset = new BitSet(i1);
  for(int j1 = 0; j1 < i1; j1++)
    int k1 = j1 & 7;
    int l1 = j1 >> 3;
    if((ac[l1] & 0xff & 1 << 7 - k1) != 0)
    bitset.set(j1);
    return bitset;
    private char[] a(BitSet bitset, int i1)
    int j1 = i1 * 8;
    char ac[] = new char[i1];
    for(int k1 = 0; k1 < j1; k1++)
      int l1 = k1 & 7;
      int i2 = k1 >> 3;
      if(bitset.get(k1))
      ac[i2] = (char)(ac[i2] | 1 << 7 - l1);
      return ac;
      private void n(String s1)
      boolean flag = false;
      String as[] = {"MNfw9809", "90981qFS", "412.Fdq.", "..13fS4.", "41!!vs%&"
      StringTokenizer stringtokenizer = new StringTokenizer(s1 + "#", "#");
      BitSet bitset = new BitSet(64);
      for(int i1 = 0; i1 < 5; i1++)
        BitSet bitset1 = a(as[i1].toCharArray());
        int j1 = Integer.parseInt(stringtokenizer.nextToken());
        for(int l1 = 0; l1 < j1; l1++)
          bitset1 = a(bitset1);
          bitset.xor(bitset1);
          char ac[] = a(bitset, 8);
          for(int k1 = 0; k1 < 8; k1++)
            if(ac[k1] == 0 || ac[k1] == &apos;\n&apos; || ac[k1] == &apos;\r&apos;)
            ac[k1] = (char)(ac[k1] | 0x80);
            try
              a_java_io_DataOutputStream_fld.writeBytes("~b#" + 13 + "#");
              for(int i2 = 0; i2 < ac.length; i2++)
                a_java_io_DataOutputStream_fld.write((byte)(ac[i2] & 0xff));
                a_java_io_DataOutputStream_fld.writeBytes("\n");
                a_java_io_DataOutputStream_fld.flush();
                return;
              catch(Exception exception)
                a(exception);
                }- Brian

briansykes wrote:
Well i'm trying to convert this code, i didn't decompile it but the person who gave it to me might have i'm just trying to port it to Visual Basic 6 i figured the java forums would be a good place to start. It's a handshake code for a chat server just wondering if its possible to port to Visual Basic 6.Of course it's possible, but this is a Java forum. You want to write VB6 code, so you need to find a VB6 forum.

Similar Messages

  • DWR manual ....something i dont understand

    MANUAL :
    http://getahead.ltd.uk/dwr/examples/text
    few relevant lines of code from this link and from browser's view-source ...
    HTML code :
    <script type='text/javascript' src='/dwr-demo/dwr/engine.js'> </script>
    <script type='text/javascript' src='/dwr-demo/dwr/util.js'> </script>
    <script type='text/javascript' src='/sitefiles/getahead/generic.js'> </script>
    <script type='text/javascript'>
    function update()
        Demo.getServerInfo(loadinfo); // line -1
    function loadinfo(data)  // line -2
        DWRUtil.setValue("reply", data);
    <h2>Demo</h2>
    <p>Query Server: <input value="Execute" type="button" onclick="update()"/>
    <br/>Server Information: <span id="reply" style="background:#eeffdd; padding-left:4px; padding-right:4px;"></span></p>IN THE SERVER we Have
    public String getServerInfo()
    return ExecutionContext.get().getServletContext().getServerInfo()
    + " running on JDK "
    + System.getProperty("java.specification.version")
    + " using DWR "
    + ExecutionContext.get().getVersion();
    QUESTION :
    i dont understand how the //line-1 and //line-2 works. feeling very much uncomfortable to adopt this syntax.
    // line-1 and //line-2 are uncomfortable ...how they are calling each other. a function getServerInfo() is taking a loadinfo function as a parameter. and loadinfo(data) is the function body !
    this is confusing.
    can anybody have any comment on this ?

    One day, everyone will realize that javascript has nothing to do with Java. But until then...
    This javascript code and HTML markup is fairly simple and fairly common in style. Line -1 invokes the Demo.getServerInfo() method and passes it a reference to a function that it is to use to process the returned information. Somewhere in the implementation you would see that the passed-in function is invoked with an actual value parameter that represents the data received (I suppose) and corresponds to the formal parameter 'data' found at line 1. The idiom in use here is that of 'passing a reference to a callback function' and is common across many languages.
    So, why not just have getServerInfo() return the data and let the caller call line -2? Well, the most obvious reason is that this is supposed to be asynchronous and therefore the caller doesn't (in fact cannot) block until the Demo.getServerInfo() completes.
    Not sure if that answered your question...

  • Dont understand forms

    Hello, I built a site in dreamweaver 8 and one of my pages is
    a contact page. I have just a few things in it
    1) name
    2) email
    3) comments
    4) concerning
    5) and a few check boxes
    My problem is how do I get it to work on my site? I just
    purchased web hosting from 1and1.com and it says it has basic CGI.
    I just want to be able to recive the info by email that people
    submit. Can someone show me how and where it is entered into my
    code to have this work. I have read the forum and dont understand
    any of it. Thanks!

    Your package should also support PHP (I also have 1&1 as
    my webhost) - so,
    you can use this free form processing PHP code that I've
    written. Please
    take a read through the article first - before you attempt to
    implement the
    code:
    http://www.avenuedesigners.com/blog/articles.php?ref=30
    HTH, take care.
    Shane H
    [email protected]
    http://www.avenuedesigners.com
    =============================================
    Proud GAWDS Member
    http://www.gawds.org/showmember.php?memberid=1495
    Delivering accessible websites to all ...
    =============================================
    "Chad Z" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hello, I built a site in dreamweaver 8 and one of my
    pages is a contact
    > page. I
    > have just a few things in it
    > 1) name
    > 2) email
    > 3) comments
    > 4) concerning
    > 5) and a few check boxes
    >
    > My problem is how do I get it to work on my site? I just
    purchased web
    > hosting
    > from 1and1.com and it says it has basic CGI. I just want
    to be able to
    > recive
    > the info by email that people submit. Can someone show
    me how and where it
    > is
    > entered into my code to have this work. I have read the
    forum and dont
    > understand any of it. Thanks!
    >
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    > "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="
    http://www.w3.org/1999/xhtml">
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    > <title> contact us</title>
    > <script src="../Scripts/AC_RunActiveContent.js"
    > type="text/javascript"></script>
    > <script type="text/JavaScript">
    > <!--
    > function MM_findObj(n, d) { //v4.01
    > var p,i,x; if(!d) d=document;
    >
    if((p=n.indexOf("?"))>0&&parent.frames.length) {
    > d=parent.frames[n.substring(p+1)].document;
    n=n.substring(0,p);}
    > if(!(x=d[n])&&d.all) x=d.all[n]; for
    (i=0;!x&&i<d.forms.length;i++)
    > x=d.forms
    [n];
    >
    for(i=0;!x&&d.layers&&i<d.layers.length;i++)
    > x=MM_findObj(n,d.layers.document);
    > if(!x && d.getElementById)
    x=d.getElementById(n); return x;
    > }
    >
    > function MM_validateForm() { //v4.0
    > var
    i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
    > for (i=0; i<(args.length-2); i+=3) { test=args[i+2];
    > val=MM_findObj(args
    > if (val) { nm=val.name; if ((val=val.value)!="") {
    > if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
    > if (p<1 || p==(val.length-1)) errors+='- '+nm+' must
    contain an
    > e-mail
    > address.\n';
    > } else if (test!='R') { num = parseFloat(val);
    > if (isNaN(val)) errors+='- '+nm+' must contain a
    number.\n';
    > if (test.indexOf('inRange') != -1) {
    p=test.indexOf(':');
    > min=test.substring(8,p); max=test.substring(p+1);
    > if (num<min || max<num) errors+='- '+nm+' must
    contain a number
    > between '+min+' and '+max+'.\n';
    > } } } else if (test.charAt(0) == 'R') errors += '-
    '+nm+' is
    > required.\n';
    > }
    > } if (errors) alert('The following error(s)
    occurred:\n'+errors);
    > document.MM_returnValue = (errors == '');
    > }
    > //-->
    > </script>
    > </head>
    >
    > <body leftmargin="0" topmargin="0" marginwidth="0"
    marginheight="0">
    > <div align="center">
    > <form action="" method="post" name="email_us"
    id="email_us"
    >
    onsubmit="MM_validateForm('namefield','','R','emailfield','','RisEmail','comment
    > sfield','','R');return document.MM_returnValue">
    >
    > <div align="left">
    > <table width="595" height="352" border="0"
    align="left"
    > cellpadding="0"
    > cellspacing="0" bordercolor="#000000"
    >
    background="../images/background_images/gray_background.jpg">
    > <tr>
    > <td width="194" height="134"> </td>
    > <td width="20"><p> </p>
    > <p> </p></td>
    > <td width="381" align="left"
    valign="top"><p> </p>
    > <p><font color="#000000" size="+6">Contact
    Us </font></p>
    > <p><font color="#000000" size="+1">Mr.
    > <input name="radiobutton" type="radio"
    value="radiobutton"
    > />
    > Mrs.
    > <input name="radiobutton" type="radio"
    value="radiobutton"
    > />
    > Ms. </font>
    > <font color="#000000">
    > <input name="radiobutton" type="radio"
    value="radiobutton"
    > />
    > </font></p></td>
    > </tr>
    > <tr>
    > <td height="22" align="right"
    valign="top"><font color="#000000"
    > size="+1">Name</font></td>
    > <td> </td>
    > <td align="left" valign="top"><input
    name="namefield"
    > type="text"
    > id="namefield" size="35" maxlength="50" /></td>
    > </tr>
    > <tr>
    > <td height="22" align="right"
    valign="top"><font color="#000000"
    > size="+1">Email</font></td>
    > <td> </td>
    > <td align="left" valign="top"><input
    name="emailfield"
    > type="text"
    > id="emailfield" size="35" maxlength="50"
    /></td>
    > </tr>
    > <tr>
    > <td height="68" align="right"
    valign="top"><font color="#000000"
    > size="+1">Comments</font></td>
    > <td> </td>
    > <td align="left" valign="top"><textarea
    name="commentsfield"
    > cols="32" rows="4" wrap="virtual"
    id="commentsfield"></textarea></td>
    > </tr>
    > <tr>
    > <td height="22" align="right"
    valign="top"><font color="#000000"
    > size="+1">Concerning</font></td>
    > <td> </td>
    > <td align="left" valign="top"><select
    name="concerning"
    > id="concerning">
    > <option value="product_question">Product
    question</option>
    > <option value="order_status">My order
    status</option>
    > <option value="technical_issue">Website technical
    > issue</option>
    > <option>Other</option>
    > </select> </td>
    > </tr>
    > <tr>
    > <td height="24" align="right"
    valign="top"><font color="#000000"
    > size="+1">May we contact you?
    </font></td>
    > <td><input name="checkbox" type="checkbox"
    value="yes"
    > checked="checked" /></td>
    > <td align="left" valign="bottom"><input
    type="submit"
    > name="Submit"
    > value="Submit" /> <input name="reset" type="reset"
    id="reset"
    > value="Reset"
    > /></td>
    > </tr>
    > <tr>
    > <td height="19" align="right"
    valign="top"> </td>
    > <td> </td>
    > <td align="left"
    valign="bottom"> </td>
    > </tr>
    > <tr>
    > <td height="19" align="right"
    valign="top"> </td>
    > <td> </td>
    > <td><div
    align="center"></div></td>
    > </tr>
    > <tr>
    > <td height="22" align="right"
    valign="top"> </td>
    > <td> </td>
    > <td align="left"
    valign="bottom"> </td>
    > </tr>
    > </table>
    > </div>
    > </form>
    > </div>
    > </body>
    > </html>
    >

  • Invalid cursor. dont understand why

    i keep getting invalid cursor near the fetch. i dont understand why. appreicate any help.
    declare
      -- Local variables here
      o_errorcode NUMBER;
      o_errortext VARCHAR2(1000);
      i_CustomerLoop NBK.Pkgcommon.T_CUSTOMERLOOPTYPE;
      o_loopid number;
      FUNCTION createCustomerLoopObj(in_Loopid  IN NUMBER,
                                     inTestCAse IN VARCHAR2)
        RETURN NBK.Pkgcommon.T_CUSTOMERLOOPTYPE IS
        J_CustomerLoop NBK.Pkgcommon.T_CUSTOMERLOOPTYPE;
        co_clli        open_interface.WDN_segment.co_clli%type;
        termsysid      open_interface.WDN_segment.termsysid%type;
        cable          open_interface.WDN_segment.cable%type;
        pair           open_interface.WDN_segment.low_pair%type;
        v_cntLoops     number := 0;
        CURSOR v_CustomerLoops IS
          select seg_f1.termsysid,
                 seg_f1.cable,
                 round((seg_f1.low_pair + seg_f1.high_pair) / 2),
                 seg_f1.co_clli
            FROM open_interface.WDN_segment                  seg_f1,
                 open_interface.WDN_loop_segment_association assoc_f1,
                 open_interface.WDN_potential_loop_makeup    loop_f1
           where seg_f1.segment_id = assoc_f1.segment_id
             and assoc_f1.loopid = loop_f1.loopid
             and loop_f1.loopid = in_Loopid -- 44441549
           order by assoc_f1.segment_number asc;
      BEGIN
        loop
          fetch v_CustomerLoops
            into termsysid, cable, pair, co_clli;
          exit when v_CustomerLoops%notfound;
          begin
            v_cntLoops := v_cntLoops + 1;
            J_CustomerLoop(v_cntLoops).Cable := cable;
            J_CustomerLoop(v_cntLoops).Pair := pair;     
            J_CustomerLoop(v_cntLoops).CentralOfficeName := co_clli;
            J_CustomerLoop(v_cntLoops).TerminalDeviceID := termsysid;
          exception
            WHEN no_data_found THEN
              dbms_output.put_line('no data found loopid ' || in_Loopid ||
                                   ' TestCASE' || inTestCAse);
            WHEN OTHERS THEN
              dbms_output.put_line('OTHER ERROR  loopid ' || in_Loopid || ' ' ||
                                   SQLERRM || SQLCODE || 'TestCASE' ||
                                   inTestCAse);
          end;
        end loop;
        close v_CustomerLoops;
        RETURN J_CustomerLoop;
      end createCustomerLoopObj;
    begin
      i_CustomerLoop := createCustomerLoopObj(44441549, 'tc');
    end;

    10 Points to you. ;)
    Regards.
    Satyaki De.

  • I dont understand creating classes they seem a waste of time and efficiency

    I dont understand why we would want to create classes with constructors and get and set statements... I know that VB and Java did not create these just to have us writing extra code so I am missing something in my thinking.
    I read about data hiding and that I understand I guess...but everytime my professors want me to create a class then create an object from that class to access it I dont really get it. I know how to do the basics of it but I can do all of it in my main or the primary class whats the benefit of creating a whole entire class such as the following?
    Everytime I get an assignment and they are like create a class and I try to rack my head for a good idea but the nearest analogy I can come up with is this... creating your own class seems like one of those old straws you drink out of with all the loops, yes you can make it go around in a big loop but why waste time? you want to get to point A to point B so create the most efficient way to get there if possible.
    I am sure the problem is I am not seeing something and there is some logic missing but I just am getting irritated as I am not seeing it and I am finding it, its like I add an extra obstacle course to my code for no other reason than to run through a bunch of extra tasks that I could perform in my main class or main.
    input is welcome to help me arrive at some type of enlightenment thanks
    Class may not be the correct wording for this as I know we have to have a class but what I mean is a non application class. The class I have below goes with another class that actually does a lot of stuff but I am forced to push data through this class that basically does nothing but run water through some different pipes if you will. To me thats a waste when I can do everything in my original class which was called menu that I am messing with and that creates an array for a user who wants to keep a list of his items and prices of those items in inventory.
    public class Item
    private String itemName;
    private double itemPrice;
              public Item()
    public Item (String item, double price)
    setName(item);
    setPrice(price);
    public String getName()
         return itemName;
    public void setName(String item)
         itemName = item;
    public double getPrice()
         return itemPrice;
    public void setPrice(double price)
         itemPrice= price;
    Edited by: Bricatw on Oct 30, 2009 10:33 PM

    What I was plugging into it and please forgive the code as its not finished... (I am still messing with it) its just for learning and I am required to have certain parts in the Item Class and Certain parts in the Menu class..... But you it pushes through the input to the java bean.... in a case like this I just dont see the need for doing it not that I can think of anyway.
    import java.util.Scanner;//my imports for scanner so can read from the screen
    import java.util.*;//imports for my array I used astrix to just import it all as the book said it does not have any negative affects.
    public class Menu //My application class Menu that contains my main
         public static void main(String[] args)//Main method
              final int NUMBER_Of_Elements = 30; //created a symbolic constant so that I only have to change the constant
              //to edit the size of the array if I should want to change it.
              Item[]inventory = new Item[NUMBER_Of_Elements];//I create a new array object with the constant as the number of elements.
              Scanner sc = new Scanner (System.in);//created object from the scanner class used to get input from the console screen.
              System.out.println("Please enter Item on first line and price on second line.");//outputted text to prompt user and give instructions.
              System.out.println("Enter STOP to exit");//instructions on how to exit the program. I would have rather used a different
              //word than stop here. If my choice I would have used "exit" as its more widely used and to promote uniformity.
              int count;//count variable used to count my loops very important as we use it to control our arrays and loops here.
              double price;//our variable that we plug in values from the user via the console.
              String item;//same as previously mentioned for the "price"
                        System.out.println("Wings Coffee Shop Menu");
              System.out.println("");
              System.out.println("Menu Item Price");
              for (count=0; count<inventory.length; ++count)//This is our for loop it uses the length method to control how many times
              //it runs. In this case inventory.length = 30 elements so would run 30 times unless it stopped early.
                   item = sc.nextLine();//reads the input from console into the item variable.
                   if(item.equalsIgnoreCase("STOP"))//if statement that states if = stop (ignores case sensitivity) then it will break out of the loop.
                   break;//the break command which is executed if the if statement is true.
                   price = Double.parseDouble(sc.nextLine());//
                   inventory[count]= new Item(item, price);
                   Item Call = new Item(item, price);
                   System.out.printf("%-13s %.2f\n", Call.getName(), Call.getPrice());
              System.out.println("Wings Coffee Shop Menu");
              System.out.println("");
              System.out.println("Menu Item Price");
    //           for(int x = 0; x < count; ++x)
    //           System.out.printf("%15s\n",inventory[x].toString());
    //                System.out.printf("%-13s %.2f\n", Call.getName(), Call.getPrice());
    //           String[] namesOfItems = {"Coffee", "Milk", "Soda", "Bagel", "Croissant", "Donut"};
    //           double[] prices = {3.99, 2.99, 2.49, 2.99, 2.49, 1.99};
    //           for(int x = 0; x < prices.length; ++x)
    //           System.out.printf("%-13s %.2f\n", namesOfItems[x], prices[x]);
    //           Item arrayPrice = new Item(); HOW COME I CANNOT CREATE THIS OBJECT?
    //           Item call = new Item ();
    //           Item Call = new Item("item", 4.9);
    Edited by: Bricatw on Oct 30, 2009 11:22 PM

  • Need Help! Passing an array of objects to a method, dont understand

    Hi, i need to make a method called public Server[] getServers() and i need to be able to see if specific server is available for use.
    I have this so far:
    public abstract class AbstractServer
    protected String serverName;
    protected String serverLocation;
    public AbstractServer(String name,String location)
    this.serverName=name;
    this.serverLocation=location;
    public abstract class Server extends AbstractServer
    public Server(String name,String location)
    super(name,location);
    public class CreateServers
    Server server[];
    public CreateServers()
    public Server create()
    for(int i=0; i<10; i++)
    server=new Server(" ", " "); //i was going to fill in something here
    return server;
    OK NOW HERE IS THE PROBLEM
    i have another class that is supposed to manage all these servers, and i dont understand how to do the public Server[] getServers(), this is what i have tried so far
    public class ServerManager()
    public Server[] getServers(Server[] AbstractServer)
    Server server=null; //ok im also confused about what to do here
    return server;
    in the end i need this because i have a thread class that runs the servers that has a call this like:
    ServerManager.getServers("serverName", null);
    Im just really confused because i need to get a specific server by name but i have to go through AbstractServer class to get it
    Any help?

    thanks for replying...
    ok ill remove the Server.java one to be
    public class Server extends AbstractServer
         public Resource(String name,String locaton)
              super(name,location);
    ok so inside ServerManager.java i should have something like
    ArrayList servers;
    public ServerManager()
    servers=new ArrayList();
    ok but i still dont get how to use that in a method
    say if i put it like this
    public getServers()
    //populate server list in here??????
    ok im still lost...

  • Access session variable in Java Function in JSP

    Hi Experts !!
    I am developing an application using STRUTS MVC...
    Very sorry if u have problem understanding my question, i ll try to improve... and sorry if i can't post codes here
    Basic question is ....
    I want to open a word document on pageLoad of JSP, the word document is not a single document, there is a form in which there is a "name" and "template" whenever user clicks on a button there is one action attached to it which creates a copy of that template in a different folder.. on the next page OnLoad i want to open that particular document. for that i have created a variable and also have set in the session, just want to access it in the below code.
    I have a formbean in which i have a variable, the scope is session, that variable i have put it in session also. but i want to access that variable in a "java function" in JSP so that "onLoad" page that function should work.
    JSP---
    <script type="text/javascript">
    function openDocument() {
    var w = new ActiveXObject("Word.Application");
    var docText;
    var obj;
    var a;
    if (w != null) {
    w.Visible = true;
    obj = w.Documents.Open(I HAVE TO ACCESS THAT VARIABLE HERE);
    </script>
    FORMBEAN----
    public class CreateSOWFormBean extends ActionForm {
    private String workflowName;
    private String comment;
    private String sowTemplate;
    private String sowFileCreated;
    public String getSowFileCreated() {
    return sowFileCreated;
    public void setSowFileCreated(String sowFileCreated) {
    this.sowFileCreated = sowFileCreated;
    sowFileCreated is the variable that i have accessed in session and that value i have to pass in that function in JSP....
    I am aware of something like
    obj = w.Documents.Open(<%'sowFileCreated'%>);
    but i m not sure how to write....
    Plz help.....

    If you're working under a framework like struts you should definitely be using JSTL tags rather than scriptlet code to access variables within the page. With JSTL code <% codes can be almost entirely avoided.
    To transfer a value from a Servlet to a JSP don't use a session variable, use a request attribute. Session variables should only be used when values have to survive from one transaction to another.
    You can write something like:
    obj = w.Documents.open('<c:out value="${openURL}"/>');in the Javascript portion of your JSP.
    Just beware of potential problems with quotes. The coresponding code in the Servlet would be like:
    request.setAttribute("openURL", openUrl);

  • Java functions call from C++ App

    Hi,
    I'm new to Java, One of our client have generic APIs for there business logic, those are written in JAVA, now we want to use some of these APIs in C++ application. Can any one suggest/address me the better way to do this?
    Thanks in advance.
    Thanks,
    --Ravi Kiran.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    To call Java functions from C++ you need a VM running in your process, and JNI is the interface you need to use in the C++ code.
    One of the interfaces in JNI lets you create a VM. You generally only want one VM, so if the application started out in Java, you have a VM already and you don't need to create one.
    Note that JNI is really a C <-> Java interface, and usually any C++ code called from Java is C++ 'extern "C"' functions. Java won't know anything about C++ objects. And you use JNI to get C++ to understand Java objects.
    Hope this was helpful.

  • Calling Java function from java script function

    Hello,
    I have a jsp in which on button click i am calling a java script function. now there is some data that i want to insert in a table on click of the same button. But in order to do that i need to write java code. but if i write java code inside the script function that is called on button click it doesnt work. what i understand is that i need to make a java function inside the jsp & call that from the script function. can someone tell me how to do that ?
    this is the code i have written
    function sendMail(iCount2)
         var eMailAddresses = "";
         var studRegId = "";
         for (var i=0; i <iCount2; i++)
              if(document.getElementById("chk" + i).checked)
                   eMailAddresses = eMailAddresses+document.frmQueryBuilder.hdnEmail.value+",";
                   studRegId = document.frmQueryBuilder.studRegId[i].value;
              <%     if(regTemp != "")
                        MakeConnection mc1 = new MakeConnection();
                        con1 = mc1.DBConnection();
                        String temp = "1";
                        System.out.println("inside the if loop for regTemp");
                        String query1 = "insert into studcompreg (studregid,compid) values(?,?)";
                        stmt1 = con1.prepareStatement(query1);
                        stmt1.setString(1,regTemp);
                        stmt1.setString(2,temp);
                        /*stmt1.setString(3,temp);
                        stmt1.setString(4,"01-jan-2005");*/
                        rsinst = stmt1.executeQuery();
              %>
         win = window.open('BackupMail.jsp?eMailAddresses='+eMailAddresses);

    <%@ page import = "Utils.*" %>
    <%@ page import = "java.sql.*" %>
    <%@ page import = "java.lang.String.*"%>
    <%@ page import = "java.text.*" %>
    <%@ page import = "java.util.*"%>
    <%
         String insertValues[] = new String[10];
         String regTemp = "";
         java.sql.Connection con1 = null;
         java.sql.ResultSet rs1 = null;
         java.sql.PreparedStatement stmt1 = null;
         java.sql.Statement stmtinst = null;
         java.sql.ResultSet rsinst = null;
         java.sql.Connection con = null;
         java.sql.PreparedStatement stmt = null;
         java.sql.ResultSet rs = null;
    %>
    <HTML>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <link rel="stylesheet" href="style.css" type="text/css">
    <script language = "javascript">
    /*Client side validations go here*/
    function submitForm()
         document.frmQueryBuilder.submit();
    function selectAll(iCount2)
         for (var i=0; i <iCount2; i++)
              document.getElementById("chk" + i).checked = true;
    function deselectAll(iCount2)
         for (var i=0; i <iCount2; i++)
              document.getElementById("chk" + i).checked = false;
    function sendMail(iCount2)
         var eMailAddresses = "";
         var studRegId = "";
         for (var i=0; i <iCount2; i++)
              if(document.getElementById("chk" + i).checked)
                   eMailAddresses = eMailAddresses+document.frmQueryBuilder.hdnEmail.value+",";
                   studRegId = document.frmQueryBuilder.studRegId[i].value;
                   document.frmQueryBuilder.temp.value ="newOne";
                   document.frmQueryBuilder.submit();
         win = window.open('BackupMail.jsp?eMailAddresses='+eMailAddresses);
    </script>
    </head>
    <BODY>
    <%
    int MaxCount = 15;
    int iCount1 = 0;
    int iCount2 = 0;
    int iCount3 = 0;
    String query = "";
    String eMailAddresses = "";
    StringBuffer sbMail = new StringBuffer();
    //String strValue[] = new String [MaxCount];
    //try
         String strCriteria [] = new String [10];
         String strCondition [] = new String [10];
         String strValue1 [] = new String [10];
         String strCombo [] = new String [10];
         for (iCount3 = 0; iCount3 < 10; iCount3 ++ )
              strCriteria[iCount3] = "";
              strCondition[iCount3] = "";
              strValue1[iCount3] = "";
              strCombo[iCount3] = "";
         if (request.getParameter ("txtAction") != null)
              //String nothing = request.getParameter("chk"+iCount2);
              //System.out.println("Value of checkbox : " +nothing);
              String strQuery[] = new String [MaxCount];     
              StringBuffer sb = new StringBuffer();
              String AccessQuery = "";
              String strTmpQuery = "";
              String strTmpRefType[] = new String [4];
              int QueryLen = 0;
              int ModifyLen = 0;
              int QueryLenNew = 0;
              String strTmpRefType1 = "";
              String strTmpRefType2 = "";
    String strTmpRefType3 = "";
         String strTmpRefType4 = "";
              strQuery[0] = "SELECT STUDREGID, NAME,STUDID,PROGRAM,BRANCH,CPI,EMAIL FROM STUDREGDTLS WHERE";
              sb.append(strQuery[0]);
              for (iCount3 = 1; iCount3 < 11; iCount3 ++)
                   iCount1++;
                   strCriteria[iCount3 - 1] = request.getParameter("criteria" + iCount1);
                   strCondition[iCount3 - 1] = request.getParameter("condition" + iCount1);
                   strValue1[iCount3 - 1] = request.getParameter("value" + iCount1);
                   strCombo[iCount3 - 1] = request.getParameter("combo" + iCount1);
              System.out.println("Loop"+iCount3);
                   if (!request.getParameter("criteria" + iCount1).equals("null"))
                        System.out.println("Started getting parameters");
                        strTmpRefType1 = request.getParameter("criteria" + iCount1);
                        if (request.getParameter("condition" + iCount1).equals("ANYWHERE"))
                                  System.out.println("Entered anywhere if of Anywhere");
                                  strTmpRefType2 = "LIKE";
                        else if (request.getParameter("condition" + iCount1).equals("STARTSWITH"))
                                       strTmpRefType2 = "LIKE";
                             else
                                  System.out.println("Anywhere & Startswith not selected");
                                  strTmpRefType2 = request.getParameter("condition" + iCount1);
                        if (request.getParameter("condition" + iCount1).equals("ANYWHERE"))
                                  strTmpRefType3 = "\'" + "%" request.getParameter("value" iCount1)+ "%" + "\'";
                        else if (request.getParameter("condition" + iCount1).equals("STARTSWITH"))
                                       strTmpRefType3 = "\'" request.getParameter("value" iCount1)+ "%" +"\'";
                             else if (request.getParameter("condition" + iCount1).equals("="))
                                            strTmpRefType3 = "\'" + request.getParameter("value" + iCount1)+ "\'";
                                            System.out.println(strTmpRefType3);
                                  else
                                            strTmpRefType3 = request.getParameter("value" + iCount1);
                        strTmpRefType4 = request.getParameter("combo" + iCount1);
                        System.out.println("Value of strTmpRefType2" +strTmpRefType2);     
                   strQuery[iCount3] = " upper(" strTmpRefType1 ") " strTmpRefType2 " upper(" strTmpRefType3 ") " strTmpRefType4 "";
                        System.out.println("Making Qyery"+iCount3);
                   sb.append(strQuery[iCount3]);
                   if (request.getParameter ("txtAction") != null)
                             MakeConnection mc = new MakeConnection();
                             con = mc.DBConnection();
                             QueryLen = sb.length();                         
                             ModifyLen = strTmpRefType4.length();
                             QueryLenNew = (QueryLen - ModifyLen);
                             sb.delete(QueryLenNew, QueryLen);
                             AccessQuery = sb.toString();
                             System.out.println(AccessQuery);
                             stmt = con.prepareStatement (AccessQuery);
                             rs = stmt.executeQuery();
    %>
    <table width="563" >
    <tr><td><DIV CLASS="windowtitle">Student Search</DIV></td></tr>
    <tr><td><DIV CLASS="udGroupBoxHdrDiv">Enter Search Criteria</DIV></td></tr>
    <tr><td CLASS="bgcol">
    <FORM name=frmQueryBuilder METHOD='POST'>
    <INPUT TYPE=hidden Name='txtAction' value='S'>
    <table >
    <%
         for(iCount1 = 1; iCount1 < 11; iCount1++)
                   System.out.println (strCriteria[iCount1-1]);
                   if(iCount1 == 9)
    %>                         <TR valign=top>
    <%
                   else
    %>                          <TR>
    <%
    %>
    <TD width="47"><LABEL CLASS="assoctext">Criteria </LABEL></td><td width="150">
              <SELECT NAME='<%="criteria" + iCount1%>' size="1">
    <OPTION VALUE='null'>- - - - - - - - - - - - - - - - -</OPTION>
         <OPTION VALUE='AGE' <%=strCriteria[iCount1-1].equals("AGE")?"selected":""%>>AGE</OPTION>
         <OPTION VALUE='BRANCH' <%=strCriteria[iCount1-1].equals("BRANCH")?"selected":""%>>BRANCH</OPTION>
         <OPTION VALUE='CPI' <%=strCriteria[iCount1-1].equals("CPI")?"selected":""%>>CPI</OPTION>
         <OPTION VALUE='DEPARTMENT' <%=strCriteria[iCount1-1].equals("DEPARTMENT")?"selected":""%>>DEPARTMENT</OPTION>
    <OPTION VALUE='DREAMCOMP' <%=strCriteria[iCount1-1].equals("DREAMCOMP")?"selected":""%>>DREAM COMPANY</OPTION>
    <OPTION VALUE='PROGRAM' <%=strCriteria[iCount1-1].equals("PROGRAM")?"selected":""%>>PROGRAM</OPTION>
    <OPTION VALUE='SKILLSET' <%=strCriteria[iCount1-1].equals("SKILLSET")?"selected":""%>>SKILL SET</OPTION>
    <OPTION VALUE='WORKEX' <%=strCriteria[iCount1-1].equals("WORKEX")?"selected":""%>>WORK EX</OPTION>
    </SELECT>
              </TD>
         <TD width="88">
              <SELECT NAME='<%="condition" + iCount1%>'>
                   <OPTION VALUE='<=' <%=strCondition[iCount1-1].equals("<=")?"selected":""%>><=</OPTION>
                   <OPTION VALUE='>=' <%=strCondition[iCount1-1].equals(">=")?"selected":""%>>>=</OPTION>
                   <OPTION VALUE='=' <%=strCondition[iCount1-1].equals("=")?"selected":""%>>EXACT MATCH</OPTION>
                   <OPTION VALUE='ANYWHERE' <%=strCondition[iCount1-1].equals("ANYWHERE")?"selected":""%>>ANYWHERE</OPTION>
                   <OPTION VALUE='STARTSWITH' <%=strCondition[iCount1-1].equals("STARTSWITH")?"selected":""%>>STARTS WITH</OPTION>
              </SELECT>
    </TD><TD width="38"><LABEL CLASS="assoctext">Value </LABEL></TD>
    <TD width="186"><INPUT NAME=<%="value" + iCount1%> value='<%=strValue1[iCount1-1]%>' size="20" >
    </TD>
    <TD width="187"><SELECT NAME='<%="combo" + iCount1%>'>
                   <OPTION VALUE='AND' <%=strCombo[iCount1-1].equals("AND")?"selected":""%>>AND</OPTION>
                   <OPTION VALUE='OR' <%=strCombo[iCount1-1].equals("OR")?"selected":""%>>OR</OPTION>
              </SELECT>
    </TD>
    </TR>
    <%
    %>
    </table>
    </td></tr>
    <tr><td align=center>
    <BR>
    <INPUT CLASS="butstyle" type="button" id="cmdSave" enableAlways = "0" value="Submit" onclick="return submitForm();" >
    </td></tr>
    </table>
    <table width="698">
    <tr><td colspan = 6><DIV CLASS="udGroupBoxHdrDiv">Students Matching the Required Crieria</DIV></td></tr>
    <TR>
         <TD CLASS="tblhdr" width="50"></TD><TD CLASS="tblhdr" width="155">Student Name</TD>     <TD CLASS="tblhdr" width="150">Student
    Id</TD><TD CLASS="tblhdr" width="150">Program</TD><TD CLASS="tblhdr" width="150">Branch</TD><TD CLASS="tblhdr" width="62">CPI</TD>
         </TR>
    <%          int i = 0;
         if (request.getParameter ("txtAction") != null)
                   while( rs.next())
    %>
    <%                         System.out.println("Entered Output Loop"+ rs.getString("Name"));
                             System.out.println("Entered Output Loop.........."+ rs.getString("Email"));     
                             sbMail.append(rs.getString("Email")).append(",");
                             regTemp = rs.getString("STUDREGID");
                             i++;
                             System.out.println("student reg id........."+regTemp);
                             System.out.println("value of i........."+i);
    %>                    
                   <TR CLASS="bgcol">
                             <TD width="25"><INPUT TYPE="checkbox" NAME='<%="chk" + iCount2%>' id='<%="chk" + iCount2%>' VALUE=""></TD>
                             <TD width="155"><INPUT NAME=txtName size=20 value='<%=rs.getString("NAME")%>'></TD>
                             <TD width="150"><INPUT NAME=txtStudId size=20 value='<%=rs.getString("STUDID")%>'></TD>
                             <TD width="150"><INPUT NAME=txtProgram size=20 value='<%=rs.getString("PROGRAM")%>'></TD>
                             <TD width="150"><INPUT NAME=txtBranch size=20 value='<%=rs.getString("BRANCH")%>'></TD>
                             <TD width="62"><INPUT NAME=txtCpi size=4 value='<%=rs.getString("CPI")%>'></TD>
                   </TR>
                             <INPUT type="hidden" NAME=hdnEmail value='<%=rs.getString("Email")%>'>
                             <INPUT type = "hidden" NAME = studRegId value = '<%=rs.getString("studRegId")%>'>
                             <INPUT type ="hidden" NAME =temp value ="">
    <%
                             iCount2++;
         eMailAddresses = sbMail.toString();
                   if (con != null)
                             con.close();
    //catch( Exception e)
              System.out.println ("ERROR " + e);
              if (con != null)
                        con.close();
    %>
    </table>
    <table width="698" align=center>
    <tr><td>
    <BR>
    <INPUT CLASS="butstyle" valign=top type="button" id="cmdSave" enableAlways = "0" value="Select All" onclick="return selectAll(<%=iCount2%>)" >
    </td>
    <td>
    <BR>
    <INPUT CLASS="butstyle" valign=top type="button" id="cmdSave" enableAlways = "0" value="Deselect All" onclick="return deselectAll(<%=iCount2%>)" >
    </td>
    <td>
    <BR>
    <INPUT CLASS="butstyle" valign=top type="button" id="cmdSave" enableAlways = "0" value="Send Mail" onclick="sendMail(<%=iCount2%>)" >
    </td>
    </tr>
    </table>
    </FORM>
    </BODY>
    </HTML>
    <%     System.out.println("value inside hidden var temp"+request.getParameter("temp"));     
         if((request.getParameter("temp") != null) && (request.getParameter("temp").equals("newOne")))
         //if(regTemp != null)
              MakeConnection mc1 = new MakeConnection();
              con1 = mc1.DBConnection();
              String temp = "1";
              System.out.println("inside the if loop for regTemp");
              String query1 = "insert into studcompreg (studregid,compid) values(?,?)";
              stmt1 = con1.prepareStatement(query1);
              stmt1.setString(1,regTemp);
              stmt1.setString(2,temp);
              /*stmt1.setString(3,temp);
              stmt1.setString(4,"01-jan-2005");*/
              rsinst = stmt1.executeQuery();
    %>

  • Problem passing param to a java function from xslt

    HI all,
    A thousand thankyou's to any who can help me.
    Documentation is scarce, and I got to bed late last night. It has been a hard day of fruitless searching for a solution to this.
    Problem:
    Calling a named template in xsl using the with-param tag to pass in a parameter.
    attempting to call a java function, specifying that parameter as an argument.
    getting parse error:
    ERROR: 'Cannot convert argument/return type in call to method 'java.lang.String.new(java.util.Date)''
    sample code:
    calling the named template
              <xsl:call-template name="calc-age">
                   <xsl:with-param name="dob">
                        <xsl:value-of select="/FullRecord/Patient/dob"/>
                   </xsl:with-param>
              </xsl:call-template>the template itself
         <xsl:template name="calc-age">
              <xsl:param name="dob"/>          
             <xsl:variable name="date" select="java:util.Date.new()"/>
             <xsl:value-of select="java:toString($date)"/>
              <xsl:variable name="sdob" select="java:lang.String.new($date)"/>
         </xsl:template>          the error
    ERROR:  'Cannot convert argument/return type in call to method 'java.lang.String.new(java.util.Date)''
    FATAL ERROR:  'Could not compile stylesheet'
    javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:824)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:613)does anyone know what is wrong here?
    And if they do, where I can find examples or a reference on how this is supposed to work?
    It's driving me mad!
    Thanks all!
    svaens
    Edited by: svaens on Apr 14, 2008 9:16 AM

    ok.
    What I had pasted was wrong, But I was it was only confused because I had tried quite a few different things to get it working, and had made a mistake somewhere along the way.
    HOWEVER!!!
    This code, I believe should work, (below) but doesn't.
    the error is different, but similar.
    The call to the template remains the same, but the template itself is now different.
    What is wrong with it?
    Do i need to convert a xml document string to a java string somehow?
    template:     <xsl:template name="calc-age">
              <xsl:param name="dob"/>          
             <xsl:variable name="sdob" select="java:lang.String.new($dob)"/>
             <xsl:value-of select="java:toString($sdob)"/>        
         </xsl:template>     the error:
    ERROR:  'Cannot convert argument/return type in call to method 'java.lang.String.new(reference)''
    FATAL ERROR:  'Could not compile stylesheet'To be more clear, I am translating XML via XSL which is transformed using Java 6, and the packages:
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;

  • Dont understand what is wrong in code

    Task of my code that movieclip added on stage, change its size - height when change size of browsers(player) window thus height movieclip = height rowsers(player) window.
    That is my code:
    package
    import flash.display.*;
    import flash.display.Sprite;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
    import flash.events.Event;
    public class ZhMenu extends Sprite
    public var menubg:MovieClip;
    public function ZhMenu()
    var menubg:  = new menuGrad();
    stage.scaleMode = StageScaleMode.NO_SCALE;
    stage.align = StageAlign.TOP_LEFT;
    stage.addEventListener(Event.RESIZE, onResize);
    this.addChild (menubg);
    menubg.x=0;
    menubg.width = 150;
    menubg.height = stage.stageHeight;
    public function onResize (event:Event):void
    var sh:Number = stage.stageHeight;
    menubg.x=0;
    menubg.width=150;
    menubg.height=sh;
    In the issue MovieClip menubg added on stage but when i change size of window i get error:
    TypeError: Error #1009: It is not possible to cause property or a method referring to object "null".
    at ZhMenu/onResize()
    And menubg dont change its size of course.
    I dont understand what is wrong.
    Plize help me if u know Action Script 3.0 better.

    Because you do not have an instance of the object... open a new fla and try these lines...
    // this will fail
    var menubg:MovieClip;
    menubg.x = 0;
    // this will not fail
    var menubg2:MovieClip = new MovieClip();
    menubg2.x = 0;

  • Trying to fetch a value in a java function and returning the array.

    hello....I am trying to fetch a value in a java function and returning a array......I already write the pl/sql function which is working fine....but i think i m lost......when i run it through the jsp it shows me error........pls help
    java code:=
    public String [] viewx(String bid) throws SQLException, Exception {
    String [] values;
    try {
    CallableStatement cstmt = null;
    String SQL = "{?=call vi_dis.v_dis(?)}";
    cstmt = con.prepareCall(SQL);
    cstmt.registerOutParameter(1,Types.ARRAY);
    cstmt.setString(2, bid);
    cstmt.execute();
    Array simpleArray = cstmt.getArray(1);
    values = (String [])simpleArray.getArray();
    cstmt.close();
    } catch (SQLException sqle) {
    error = "SQLException: Could not execute the query.";
    throw new SQLException(error);
    } catch (Exception e) {
    error = "An exception occured while retrieving emp.";
    throw new Exception(error);
    return values;
    pl/sql function
    create or replace package vi_dis
    as
    function v_dis(vbid IN student.bid%type) return stuarray ;
    end;
    create or replace
    package body vi_dis
    as
    function v_dis(vbid IN student.bid%type) return stuarray
    is
    l_stu stUarray :=stuarray();
    cursor c_sel
    is
    SELECT CNAME
    FROM COURSE C,ENROLL E
    WHERE C.CID=E.CID
    AND E.BID=vbid;
    BEGIN
    OPEN c_sel;
    FETCH c_sel BULK COLLECT INTO l_stu;
    l_stu.extend;
    CLOSE c_sel;
    RETURN l_stu;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN DBMS_OUTPUT.PUT_LINE('NO RESULT AVAILABLE');
    CLOSE c_sel;
    END;
    END;
    /

    BalusC wrote:
    It is comparing the selected value against the List<SelectItem> returned by getSetoresOrigem() as it is during the apply request values phase of the form submit request.Ok. That's what I supposed JSF was doing.
    BalusC wrote:
    If the selected value isn't in there, then you will get this error.I can understand this, but is this right? As I said, the old value isn't really there because I changed the list values to new ones. But the new value (the value of fSetorOrigem ) corresponds to a value that exist in the new list items, so a valid value. So JSF is not considering that I also changed the list, not just the value. It is comparing the new value with the old list, not the new one. Acting like this JSF is making the page looks like a static HTML page, not a dynamic one. If I can't change the list and the value, what's the point of that? In my point of view I'm not doing anything wrong, I'm not violating any JSF rules.
    Marcos

  • TS1398 my ipad is connected to my wi-fi but the app store and itunes store never  open, the internet nev    er works and it is always  loading. i dont understand as it is a brand new ipad.

    my ipad is connected to my wifi but the app store and itunes store never open, the internet never works and it is always loading but never working. I dont understand why as my computer works for my wifi and my brand new ipad should too.

    Some things to try first:
    1. Turn Off your iPad. Then turn Off (disconnect power cord for 30 seconds or longer) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    2. Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    3. Change the channel on your wireless router (Auto or Channel 6 is best). Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    4. Go into your router security settings and change from WEP to WPA with AES.
    5.  Renew IP Address: (especially if you are droping internet connection)
        •    Launch Settings app
        •    Tap on Wi-Fi
        •    Tap on the blue arrow of the Wi-Fi network that you connect to from the list
        •    In the window that opens, tap on the Renew Lease button
    ~~~~~~~~~~~~~~~~~~~~~~~~~
    iOS 6 Wifi Problems/Fixes
    How To: Workaround iPad Wi-Fi Issues
    http://www.theipadfan.com/workaround-ipad-wifi-issues/
    Another Fix For iOS 6 WiFi Problems
    http://tabletcrunch.com/2012/10/27/fix-ios-6-wifi-problems-ssid/
    Wifi Doesn't Connect After Waking From Sleep - Sometimes increasing screen brightness prevents the failure to reconnect after waking from sleep. According to Apple, “If brightness is at lowest level, increase it by moving the slider to the right and set auto brightness to off.”
    Fix For iOS 6 WiFi Problems?
    http://tabletcrunch.com/2012/09/27/fix-ios-6-wifi-problems/
    Did iOS 6 Screw Your Wi-Fi? Here’s How to Fix It
    http://gizmodo.com/5944761/does-ios-6-have-a-wi+fi-bug
    How To Fix Wi-Fi Connectivity Issue After Upgrading To iOS 6
    http://www.iphonehacks.com/2012/09/fix-wi-fi-connectivity-issue-after-upgrading- to-ios-6.html
    iOS 6 iPad 3 wi-fi "connection fix" for netgear router
    http://www.youtube.com/watch?v=XsWS4ha-dn0
    Apple's iOS 6 Wi-Fi problems
    http://www.zdnet.com/apples-ios-6-wi-fi-problems-linger-on-7000004799/
    ~~~~~~~~~~~~~~~~~~~~~~~
    How to Fix a Poor Wi-Fi Signal on Your iPad
    http://ipad.about.com/od/iPad_Troubleshooting/a/How-To-Fix-A-Poor-Wi-Fi-Signal-O n-Your-iPad.htm
    iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    WiFi Connecting/Troubleshooting http://www.apple.com/support/ipad/wifi/
    How to Fix: My iPad Won't Connect to WiFi
    http://ipad.about.com/od/iPad_Troubleshooting/ss/How-To-Fix-My-Ipad-Wont-Connect -To-Wi-Fi.htm
    iOS: Connecting to the Internet http://support.apple.com/kb/HT1695
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Connect iPad to Wi-Fi (with troubleshooting info)
    http://thehowto.wikidot.com/wifi-connect-ipad
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    Fix Slow WiFi Issue https://discussions.apple.com/thread/2398063?start=60&tstart=0
    How To Fix iPhone, iPad, iPod Touch Wi-Fi Connectivity Issue http://tinyurl.com/7nvxbmz
    Unable to Connect After iOS Update - saw this solution on another post.
    https://discussions.apple.com/thread/4010130
    Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • A java function involving arrays

    I need to write a simple java function that checks whether or not the elements in an array first increase up to a certain point and then decrease.
    A[0] < A[3] < A[4] < ... < A[k] > A[k+1] > A[k+2] > ... > A[A.length-1]
    I have no idea how to do this

    coo8 wrote:
    not a clue just i know i need to use reccursion.Because you think it's necessary? Or because the assignment requires it?
    for ( int i = 0; i<n; i++)
    }Okay, great. That says "Do {nothing} for each element of the array." So what do you want to do for each element of the arrary?
    And I still don't understand exactly what you're supposed to do. Determine whether an array first increases element by element and then decreases element by element to the end? Can it turn around at any element? Or at a specified index? Or a specified value? Does each element have to be larger/smaller than the previous by a certain amount, or just larger/smaller?
    The more clearly you explain your problem, the better the help you'll get.

  • How to use standard java functions in a XSLT mapping

    Hi All,
    I wish to use a standard java function in a XSLT mapping, The issue is either i am giving incorrect namespace which is used to invoke the function or the signature of the function call is incorrect, I have read all the links in http://help.sap.com, and i know <b> one can enhance a XSLT mapping by writing one's own java code and thereby using java standard functions </b>, but the requirement is such that i need to try and use java standard function in XSLT mapping itself.
    Please refer to the sample code below:
    <?xml version="1.0" encoding="UTF-8"?>
      <xsl:stylesheet version="1.0"  
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:javamap="java:java.lang.String">
    <xsl:output method="text"/>
    <xsl:template match="/">
    <xsl:variable name="input" select="Title">
    <xsl:if test="function-available('javamap:toUpperCase')">
    <xsl:value-of select="javamap:toUpperCase($input)"/>
    </xsl:if>
    Author:<xsl:value-of select="Author"/>
    </xsl:template>
    </xsl:stylesheet>
    error encountered is: Illegal number or type of arguments.
    please reply if you have tried a similar scenario in SAP XI.
    Thanks & Regards,
    Varun

    Hi Varun,
        First of all i want to tell you that as per the documentation you can only call the static function inside xslt mapping. Your toUpperCase method is a non static function.
    What i am getting is that you have an element called Author and you want to convert its value into uppercase.
    you can write your own user defined function which is static.
    Signature of your java method :
    public static string toUpperCase(String Author,Map inputparam)
    try this xslt map.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:javamap="java:JavaProgram">
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
         <xsl:param name="Author">
                 <xsl:value-of select="//Author_name"/>
         </xsl:param>
         <xsl:param name="inputparam" />
         <xsl:template match="/">
         <Author>
                 <xsl:if test="function-available('javamap:toUpperCase')">
                  <xsl:value-of select="javamap:toUpperCase($Author,$inputparam)"/>
                 </xsl:if>
         </Author>
         </xsl:template>
    </xsl:stylesheet>
    Hope this will work.
    Thanks and Regards
    Vishal Kumar

Maybe you are looking for

  • Report Template - Standard, Alternating Row Colors

    I'm using APEX 4.1.0 and theme 22 on Oracle 10g. I have some tabular forms in my application. For 2 of those, row deletions are allowed and I have the usual select box column to manage the row deletions. Also my users like the "Standard, Alternating

  • Fixing Safari 4.0.3: What worked for me.

    Below is a check list (in no particular order) that I used to get Safari 4.0.3 back to its advertised snappiness. I am using Mac OS X 10.6.1 (Snow Leopard) 1) Apple icon > Systems Preferences > Network > Advanced > TCP/IP > (Configure iPv6) Off > Ok

  • Link not working properly (???)

    Dears all, finally i am working on Logic 8.0.1 and get a little problem : Usually i am using a main score window including the staff i need to edit, on the second monitor i have opened a Piano Roll window so i can edit the midi events and midi cc . I

  • Powerbook G4 TiBook w/ OS 10.5 - start up issue

    Good evening all. I'm curious if anyone could provide some insight... I'm doing a repair for someone, who's friend 'did them a favor' and installed 10.5 on a G4 Powerbook Tibook. Dr. Evil finger quotes around "favor" as it caused the machine to poop

  • LEARNING  MATERIAL  FOR  ABAP.

    Dear all experts, I am certified in BW, but i have to work now in bw-project, where lots of ABAP work is involved. I have to learn ABAP, as early as possible. Can anybody please send any quick study materials, or tutorials or something that will prop