Need help in store many strings under same instance.

i making a student system.
when user enter new pin , he will ask to enter his subject code and his grade, the system will keep asking him for more code or he can enter 0 to enter other people data. the System exit when the person type "EXIT" , we will print out what he had stored.
<<sample below>>
Enter pin number(EXIT to print out) : 1234
Enter subject code( "0" to add more pin number) : abc
Enter grade : A
Enter subject code( "0" to add more pin number) : bcd
Enter grade : F
Enter subject code( "0" to add more pin number) : 0
Enter pin number(EXIT to print out) : 2456
Enter subject code( "0" to add more pin number) : ggg
Enter grade : C
Enter subject code( "0" to add more pin number) : fff
Enter grade : B
Enter subject code( "0" to add more pin number) : 0
Enter pin number(EXIT to print out) : EXIT
student 1234 take abc gradeA and bcd gradeF
student 2456 take ggg gradeC and fff gradeB
i can use a counter to count how many pin number been entered. 1 pin number represent 1 student.
use pinNumber[count] to store each pin
but my main problem is how do store those subject codes together for each pin number?
anyone can show me how my skeleton of program like?

is it possible to create a class student and inside we create a vector just to store all courses enter ...
then we can make many instance of class student.?
but if we had vector in the class student, how to access it? or even add elements to the vector?
class student{
public string name
vector coursecodes = new vector(); //to store more than1 coursecode
public static void main(String[] args)throws IOException
student student1 = new student();
student student2 = new student();
student student3 = new student();
// how to add elements to vector of each instances of student class
//how to access coursecodes for each student1, student2, student3???
}

Similar Messages

  • Need Help in Splitting a String Using SQL QUERY

    Hi,
    I need help in splitting a string using a SQL Query:
    String IS:
    AFTER PAINT.ACOUSTICAL.1..9'' MEMBRAIN'I would like to seperate this string into multiple lines using the delimeter .(dot)
    Sample Output should look like:
    SNO       STRING
    1            AFTER PAINT
    2            ACOUSTICAL
    3            1
    4            
    5            9" MEMBRAIN
    {code}
    FYI i am using Oracle 9.2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    There's this as well:
    with x as ( --generating sample data:
               select 'AFTER PAINT.ACOUSTICAL.1..9" MEMBRAIN' str from dual union all
               select 'BEFORE PAINT.ELECTRIC.2..45 caliber MEMBRAIN' str from dual)
    select str,
           row_number() over (partition by str order by rownum) s_no,
           cast(dbms_xmlgen.convert(t.column_value.extract('//text()').getstringval(),1) as varchar2(100)) res
    from x,
         table(xmlsequence(xmltype('<x><x>' || replace(str,'.','</x><x>') || '</x></x>').extract('//x/*'))) t;
    STR                                                S_NO RES                                                                                                
    AFTER PAINT.ACOUSTICAL.1..9" MEMBRAIN                 1 AFTER PAINT                                                                                        
    AFTER PAINT.ACOUSTICAL.1..9" MEMBRAIN                 2 ACOUSTICAL                                                                                         
    AFTER PAINT.ACOUSTICAL.1..9" MEMBRAIN                 3 1                                                                                                  
    AFTER PAINT.ACOUSTICAL.1..9" MEMBRAIN                 4                                                                                                    
    AFTER PAINT.ACOUSTICAL.1..9" MEMBRAIN                 5 9" MEMBRAIN                                                                                        
    BEFORE PAINT.ELECTRIC.2..45 caliber MEMBRAIN          1 BEFORE PAINT                                                                                       
    BEFORE PAINT.ELECTRIC.2..45 caliber MEMBRAIN          2 ELECTRIC                                                                                           
    BEFORE PAINT.ELECTRIC.2..45 caliber MEMBRAIN          3 2                                                                                                  
    BEFORE PAINT.ELECTRIC.2..45 caliber MEMBRAIN          4                                                                                                    
    BEFORE PAINT.ELECTRIC.2..45 caliber MEMBRAIN          5 45 caliber MEMBRAIN      
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • I need help to convert a string to date and time

    Good aft,
    1.How can i get a date from the user input thro' Frames?
    2.How to parse it to the date object(I need to include java.util.Date but for the database i need to include java.sql.*,if i do so, i have error as
    found:java.util.Date
    Required:java.sql.Date)
    3.How to insert into the database
    The same i need help to insert time into database?
    I need solution and explanation...
    Reply me immediately...
    If u send me the code, its better to me.

    Hello,
    The best way is to use the HEX to decimal coversion VI in the string pallette. Then, write this decimal directly to your chart. If you are doing it a point at a time put it into a while loop.
    Doug

  • Still need help with case sensitive strings

    Hello guy! Sorry to trouble you with the same problem again,
    but i still need help!
    "I am trying to create a scrypt that will compare a String
    with an editable text that the user should type to match that
    String. I was able to do that, but the problem is that is not case
    sensitive, even with the adobe help telling me that strings are
    case sensitive. Do you guys know how to make that comparison match
    only if all the field has the right upper and lower case letters?
    on exitframe
    if field "t:texto1" = "Residencial Serra Verde"then
    go to next
    end if
    end
    |----> thats the one Im using!"
    There were 2 replys but both of them didnt work, and the
    second one even made the director crash, corrupting even previously
    files that had nothing to do with the initial problem..
    first solution given --
    If you put each item that you are comparing into a list, it
    magically
    makes it case sensitive. Just put list brackets around each
    item.
    on exitframe
    if [field "t:texto1"] = ["Residencial Serra Verde"] then
    go to next
    end if
    end
    Second solution given--
    The = operator is not case-sensitive when used on strings,
    but the < and > operators are case-sensitive.
    So another way to do this is to check if the string is
    neither greater than nor less than the target string:
    vExpected = "Residencial Serra Verde"
    vInput = field "t:texto 1"
    if vExpected < vInput then
    -- ignore
    else if vExpected > vInput then
    -- ignore
    else
    -- vExpected is a case-sensitive match for vInput
    go next
    end if
    So any new solutions??
    Thanks in advance!!
    joao rsm

    The first solution does in fact work and is probably the most
    efficient way
    of doing it. You can verify that it works by starting with a
    new director
    movie and adding a field named "t:texto1" into the cast with
    the text
    "Residencial Serra Verde" in the field. Next type the
    following command in
    the message window and press Enter
    put [field "t:texto1"] = ["Residencial Serra Verde"]
    You will see it return 1 which means True. Next, make the R
    in the field
    lower case and execute the command in the message window, it
    will return 0
    (true).
    Now that you know this works, you need to dig deeper in your
    code to find
    what the problem is. Any more info you can supply?

  • HT1923 need help itunes store not open

    i need help opening itunes store

    Does it show any errors? If not just go on the uninstaller and look for itunes and click repair. It worked for me

  • Need Help-How Store the input parameter through java bean

    Hello Sir,
    I have a simple Issue but It is not resolve by me i.e input parameter
    are not store in Ms-Access.
    I store the input parameter through Standard Action <jsp:useBean>.
    jsp:useBean call a property IssueData. this property exist in
    SimpleBean which create a connection from DB and insert the data.
    At run time servlet and server also show that loggging are saved in DB.
    But when I open the table in Access. Its empty.
    Ms-Access have two fields- User, Password both are text type.
    Please review these code:
    login.html:
    <html>
    <head>
    <title>A simple JSP application</title>
    <head>
    <body>
    <form method="get" action="tmp" >
    Name: <input type="text" name="user">
    Password: <input type="password" name="pass">
    <input type="Submit" value="Submit">
    </form>
    </body>
    </html>LoginServlet.java:
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class LoginServlet extends HttpServlet{
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException{
    try
    String user=request.getParameter("user");
    String pass=request.getParameter("pass");
    co.SimpleBean st = new co.SimpleBean();
    st.setUserName(user);
    st.setPassword(pass);
    request.setAttribute("user",st);
    request.setAttribute("pass",st);
    RequestDispatcher dispatcher1 =request.getRequestDispatcher("submit.jsp");
    dispatcher1.forward(request,response);
    catch(Exception e)
    e.printStackTrace();
    }SimpleBean.java:
    package co;
    import java.util.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.util.*;
    public class SimpleBean {
    private String user="";
    private String pass="";
    private String s="";
    public String getUserName() {
    return user;
    public void setUserName(String user) {
    this.user = user;
    public String getPassword() {
    return pass;
    public void setPassword(String pass) {
    this.pass = pass;
    public String getIssueData() //method that create connection with database
    try
    System.out.println("Printed*************************************************************");
    getUserName();
    getPassword();
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("Loading....");
    Connection con=DriverManager.getConnection("jdbc:odbc:simple");
    System.out.println("Connected....");
    PreparedStatement st=con.prepareStatement("insert into Table1 values(?,?)");
    System.out.println("~~~~~~~~~~~~~~~~~~~~");
    String User=getUserName();
    st.setString(1,User);
    String Password=getPassword();
    st.setString(2,Password);
    st.executeUpdate();
    System.out.println("Query Executed");
    con.close();
    s=  "Your logging is saved in DB ";
    System.out.println("Your logging is saved in DB *****************");
    return(s);
    catch(Exception e)
    e.printStackTrace();
    return "failed";
    }submit.jsp:
    This is Submit page
    <html><body>
    Hello
    Student Name: <%= ((co.SimpleBean)request.getAttribute("user")).getUserName() %>
    <br>
    Password: <%= ((co.SimpleBean)request.getAttribute("pass")).getPassword() %>
    <br>
    <jsp:useBean id="st" class="co.SimpleBean" scope="request" />
    <jsp:getProperty name="st" property="IssueData" />
    </body></html>web.xml:<web-app>
    <servlet>
    <servlet-name>one</servlet-name>
    <servlet-class>LoginServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>one</servlet-name>
    <url-pattern>/tmp</url-pattern>
    </servlet-mapping>
    <jsp-file>issue.jsp</jsp-file>
    <jsp-file>submit.jsp</jsp-file>
    <url-pattern>*.do</url-pattern>
    <welcome-file-list>
    <welcome-file>Login.html</welcome-file>
    </welcome-file-list>
    </web-app>Please Help me..Thanks.!!!
    --

    Dear Sir,
    Same issue is still persist. Input parameter are not store in database.
    After follow your suggestion when I run this program browser show that:i.e
    This is Submit page Hello Student Name: vijay
    Password: kumar
    <jsp:setProperty name="st" property="userName" value="userValue/> Your logging is saved in DB
    Please review my code.
    login.html:
    {code}<html>
    <head>
    <title>A simple JSP application</title>
    <head>
    <body>
    <form method="get" action="tmp" >
    Name: <input type="text" name="user">
    Password: <input type="password" name="pass">
    <input type="Submit" value="Submit">
    </form>
    </body>
    </html>{code}
    LoginServlet.java:
    {code}import javax.servlet.*;
    import javax.servlet.http.*;
    public class LoginServlet extends HttpServlet{
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException{
    try
    String userValue=request.getParameter("user");
    String passValue=request.getParameter("pass");
    co.SimpleBean st = new co.SimpleBean();
    st.setuserName(userValue);
    st.setpassword(passValue);
    request.setAttribute("userValue",st);
    request.setAttribute("passValue",st);
    RequestDispatcher dispatcher1 =request.getRequestDispatcher("submit.jsp");
    dispatcher1.forward(request,response);
    catch(Exception e)
    e.printStackTrace();
    }{code}
    SimpleBean.java:
    {code}package co;
    import java.util.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.util.*;
    public class SimpleBean {
    private String userValue="";
    private String passValue="";
    private String s="";
    public String getuserName() {
    return userValue;
    public void setuserName(String userValue) {
    this.userValue = userValue;
    public String getpassword() {
    return passValue;
    public void setpassword(String passValue) {
    this.passValue= passValue ;
    public String getissueData() //method that create connection with database
    try
    System.out.println("Printed*************************************************************");
    getuserName();
    getpassword();
    Class.forName("oracle.jdbc.driver.OracleDriver");
    System.out.println("Connection loaded");
    Connection con=DriverManager.getConnection("jdbc:oracle:thin:@VijayKumar-PC:1521:XE","SYSTEM","SYSTEM");
    System.out.println("Connection created");
    PreparedStatement st=con.prepareStatement("insert into vij values(?,?)");
    System.out.println("~~~~~~~~~~~~~~~~~~~~");
    String userName=getuserName();
    st.setString(1,userName);
    String password=getpassword();
    st.setString(2,password);
    st.executeUpdate();
    System.out.println("Query Executed");
    con.close();
    s= "Your logging is saved in DB ";
    System.out.println("Your logging is saved in DB *****************");
    return(s);
    catch(Exception e)
    e.printStackTrace();
    return "failed";
    }{code}
    submit.jsp:
    {code}This is Submit page
    <html><body>
    Hello
    Student Name: <%= ((co.SimpleBean)request.getAttribute("userValue")).getuserName() %>
    <br>
    Password: <%= ((co.SimpleBean)request.getAttribute("passValue")).getpassword() %>
    <br>
    <jsp:useBean id="st" class="co.SimpleBean" scope="request" />
    <jsp:setProperty name="st" property="userName" value="userValue/>
    <jsp:setProperty name="st" property="password" value="passValue"/>
    <jsp:getProperty name="st" property="issueData" />
    </body></html>web.xml:<web-app>
    <servlet>
    <servlet-name>one</servlet-name>
    <servlet-class>LoginServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>one</servlet-name>
    <url-pattern>/tmp</url-pattern>
    </servlet-mapping>
    <jsp-file>submit.jsp</jsp-file>
    <url-pattern>*.do</url-pattern>
    <welcome-file-list>
    <welcome-file>Login.html</welcome-file>
    </welcome-file-list>
    </web-app>Sir I can't use EL code in jsp because I use weblogic 8.1 Application Server.This version are not supported to EL.
    Please help me...How store th input parameter in Database through Java Bean                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Need help, trying to print strings backwards while ignoring certain things.

    To clarify the topic what I mean is I want to spell the words the user inputs backwards while skipping over certain characters. Here's my code:
    import javax.swing.*;
    import java.util.*;
    import java.text.*;
    import java.io.*;
    class SConvert{
    private static final char BLANK = ' ';
    private static final String stop = "STOP";
    public static void main(String[] args){
    char[] ignore = new char[21];
    ignore[0] = '.';
    ignore[1] = '/';
    ignore[2] = '>';
    ignore[3] = '<';
    ignore[4] = ',';
    ignore[5] = '?';
    ignore[6] = '-';
    ignore[7] = '~';
    ignore[8] = '!';
    ignore[9] = '@';
    ignore[10] = '#';
    ignore[11] = '$';
    ignore[12] = '*';
    ignore[13] = '&';
    ignore[14] = '^';
    ignore[15] = '%';
    ignore[16] = '`';
    ignore[17] = '_';
    ignore[18] = '+';
    ignore[19] = '=';
    ignore[20] = '|';
    String word, statement, append;
    boolean go = true;
    int i, numOfchar, index;
    char[] chr;
    index = 0;
    word = " ";
    statement = " ";
    append = " ";
    Scanner scanner = new Scanner(System.in);
    while (go){
    System.out.println("Enter a word");
    word = scanner.next();
    chr = word.toCharArray();
    numOfchar = word.length();
    if (word.equals(stop)){
         break;
    else if (index < numOfchar && word.charAt(index) == BLANK + BLANK){
         index = BLANK;
    else if (index < numOfchar && word.charAt(index) == (int)ignore[19]){ //Trying to range for entire array, I don't know how.
         index++;
    else
           for (i = word.length() - 1; i >= 0; i--)
              statement = statement + chr;
              append = append + " " + statement;
    System.out.print(append + " ");
    What's messing me up is the fact that whenever I try to enter words into the program, printing append only repeat EVERY occurance of statement. For example, say I type in "Ham with gravy." I get "maH htiwmaH yvarghtiwmaH".
    That's not what I want. Also, I don't know how to make the entire array of ignore available to the program, anyway to do that?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Wow. What's with the hostility? Even I was in error of detecting anything that could have solve the problem completely there's no need to use such a negative tone, epsecaility with someone who is learning to program in OOP, let alone the syntax of Java. Also, no your program did not solve all of my problems in it's original form. Let's take a look at it.
    Here's your code:
    import java.lang.String;
    import java.util.*;
    public class ReverseString {
      public void ReverseString(){
      public void printReverse(String s){
         int i;
        String noPrint = "no print'";
        char ch = '*';
        if(s.length()>1) printReverse(s.substring(1));
         ch = s.charAt(0);
        if (!noPrint.contains(ch + " ")) System.out.print(ch);
        return;
      public static void main(String[] args) {
          String myString = Here is my String.;
       System.out.print("My String: " + myString + " Reverse: ");
       new ReverseString().printReverse(add);
       System.out.println();
    }In it's original state the program doesn't allow for any user input, which is something I needed (and added on my own), it doesn't convert the ignore[] I had in my original code to anything readable (however this can be done in the noprint String quite easy as someone else mentioned earlier.) the if command does in fact ignore the special characters in noprint String HOWEVER it doesn' t not print those characters as they would appear in the myString String in the position that it original appeared in (which is the primary problem I am having.) That is the problem with your code and why it is not the complete to soultion to my homework problem. I've modified your code to satisifed all but one of the problems.
    Modified:
    import java.lang.String;
    import java.util.*;
    public class ReverseString {
      public void ReverseString(){
      public void printReverse(String s){
         int i;
        String noPrint = "~`!@#$%^&()-=+[{]}\':;?/>.<,'";
        char ch = '*';
        if(s.length()>1) printReverse(s.substring(1));
         ch = s.charAt(0);
        if (!noPrint.contains(ch + " ")) System.out.print(ch);
        return;
      public static void main(String[] args) {
           Scanner scanner = new Scanner(System.in);
          String myString;
          String add = " ";
           while (true) {
       System.out.println("Please input String.");
       myString = scanner.next();
       add = add + myString;
              if (myString.equals("STOP")){
                   break;
       System.out.print("My String: " + add + " Reverse: ");
       new ReverseString().printReverse(add);
       System.out.println();
    }If you run this code you'll see what am talking about. The only remaining problem, which I am about to restate if you are still unclear of it, is that the noprint String contents are ignored but not printed in the original position. If you are still having trouble understanding what I am talking about then let me show what I got by running the program.
    String: Ham with grav?y
    Reverse: yvarg htiw maH. [Note the ? is missing.]
    By removing the ! in the if command I get:
    Reverse: y?varg htiw maH. [Now the ? is in the wrong position.]
    It's suppose to be:
    String: Ham with grav?y
    Reverse: yvarg htiw ma?H.
    Secondly, I understand that you are frustrated with my apparent lack of understanding of proper Java tems and syntax but you must keep in mind I am student thus I am not fully aware of java as you are. With that one would expect you to act with a bit more patience, yet you not only took offense to an innocent comment you choose to slander my name and intelligence by erasing your code and calling my understanding of Java, ?ignorant.? I may be less than careful with my choice of words concerning Java but I do understand enough code to know the inner workings of a typical program, so please refrain from calling me ignorant or any variant of this in the future.
    I merely asked for help from general populous, do not think I owe you any particular praise for your code even if I find it is not exactly what I desired. I may be new to java but I am not new the message boards. With that said I find your response awfully rude and ask if you to refrain from do so in the future. I'm assuming you are an adult so act least act like someone with a bit of civility. If you were so committed to believing your code was the de facto solution to this problem then you could have simply asked why I say what I said, if had done so and shown me the error of my statement I would have not taken offense. Instead you choose to throw a fit and deleted your code. I do not know if you are like this around other board members but you should at least show courtesy to all members of this forum regardless of their time here.
    With that said, I think I've all ready found a solution to this problem I've had. I'll just tell the program to simply count over the position the character is in. That way it will stay in the same position.

  • Need help recording three shows at the same time

    I have the FiOS DVR, and have a problem this TV season.  There are 3 shows that we watch that are on at the same time.  if we are home that night, we can record two on the DVR and watch the other in another room.  Not ideal, but we can handle it.  But if we are out, we are hosed.  I have an old series 1 Tivo that I would think I could factor in here....which I could timer record on a different TV.  Any way to do it on my regular TV?  Not sure how I could hook up the Tivo with the DVR and the rest of it.
    Thanks!
    Alan

    DocAlan02 wrote:
    I have the FiOS DVR, and have a problem this TV season.  There are 3 shows that we watch that are on at the same time.  if we are home that night, we can record two on the DVR and watch the other in another room.  Not ideal, but we can handle it.  But if we are out, we are hosed.  I have an old series 1 Tivo that I would think I could factor in here....which I could timer record on a different TV.  Any way to do it on my regular TV?  Not sure how I could hook up the Tivo with the DVR and the rest of it.
    Thanks!
    Alan
    I have a similar setup with a Replay.
    You will need to get a Verizon Digital Adapter for $3.99 per Month and an IR Blaster for your Tivo.
    Connect the Digital Adapter (DCT-700) to the FIOS Coax (May need to use a Splitter).  Connect the Composite Out cables from the DCT-700 to the Tivo.  Connect the IR Blaster from the Tivo to the front of the DCT-700.  Configure the Tivo and tell it you have FIOS Cable and Digital Adapter.  You may need to find the right codes to use to control the FIOS box from the Tivo.
    Once you get it configured you will be able to tell the Tivo to record the 3rd program and it will switch the box to the channel and record it.  If the box is near your other Verizon STBs you will need to hide it or cover the IR Sensor so that the remote for the main STB does not control the Digital Adapter.
    As an added bonus you can connect the Coax Out from the DCT-700 to your Main TV if it has PIP and now you have a 2nd input source to make PIP work.
    If you are the original poster (OP) and your issue is solved, please remember to click the "Solution?" button so that others can more easily find it.
    If anyone has been helpful to you, please show your appreciation by clicking the "Kudos" button.

  • Need Help With Java Query String

    I'm new to Java and I'm passing data via a URL to another page(I'm not using a form). I have been succesfull in decoding the string to return the name value below:
    <SCRIPT LANGUAGE="JavaScript">
    function decodeSearchString() {
    var nameValue = new Array();
    var searchStr = unescape(location.search.substring(1));
    if (searchStr) {
    var formElement = searchStr.split("&");
    var tmpArray = new Array();
    for (k = 0; k < formElement.length; k++) {
    tmpArray = formElement[k].split("=");
    nameValue[tmpArray[0]] = tmpArray[1];
    return nameValue
    var srchData = decodeSearchString();
    </SCRIPT>
    However, now I need to add the value returned from the above srcipt to the Java script listed below:
    <SCRIPT Language="Javascript" SRC="#srchData.link#?open&pID=PAR"> </SCRIPT>
    This above script if working will add the HTML from the URL query to the page, but I keep getting a Java Error with this script. Please Help !

    I assume you are using a JSP page and not just solely doing Javascript. IF you are using JSP, then read on. Otherwise, I can revisit your script.
    To obtain the value of the query string, you would use a method call such as:
    String strQuery = request.getQueryString()
    Or, to get a single parameter off the query string, you can call:
    String strSearchData = request.getParameter("paramname");
    Or, if you want all the parameters and values instead of just one long string you can call:
    Enumeration enumParamNames = request.getParameterNames();
    You can use the above enumeration in combination with getParameter() to get the values.
    In order to build your script line and add the query string, you would then do something like this:
    <SCRIPT Language="Javascript" SRC="#<%=strSearchData%>.link#?open&pID=PAR"> </SCRIPT>
    Notice the <%= %> block in the above code.
    I hope that is what you were looking for. Your example is somewhat confusing so I may have answered wrong.
    Mike

  • Needing help with Too Many Activations

    I have an Aluratek LIBRE eReader and am trying to solve an ongoing problem.  Last week I checked out a book from my local library and tried transferring it onto my reader.  When I attempted the transfer, I received an error saying No Permission to Copy Document.  After that, I opened Case #0181671508 to try and get the error fixed.  There was an email sent back to me saying I needed to get in touch with Aluratek.  So I called Aluratek and was told that I needed a Firmware update.  I ended up getting that completed but still got the same error.  After that, I uninstalled ADE and reset my reader in the hopes that starting from the beginning would help.  After reinstalling ADE and hooking up my reader, I got a new error:  E_ACT_TOO_MANY_ACTIVATIONS.  Sent in an update to my case and was told again that I needed to get with Aluratek and update the Firmware.  Please help me in figuring out what actually needs to be done so I can get to the point of transferring books onto my reader and actually being able to use it.

    You need to ask Adobe to reset all your activations, then reactivate devices you still need.
    Unfortuately, Adobe DRM does not have proper support site to allow you to view and change your device activations.
    http://helpx.adobe.com/x-productkb/policy-pricing/activation-deactivation-products.html and try live chat.

  • I need help to store images in database

    hi,
    at present i am working in oracle, i need one help.
    i want to create one directory in c:\drive and i have to store and retreive my images in that directory.i want to do in oracle only,i am not using any front end. i need coding for that,please give me coding to do that.first i have to store that images in my table.that image is in my desktop,how to call that image and how to store that image in my table and how to store that image in that directory. please give coding and ideas for that,help meeeeeeeeeeeeee.

    You need to create a oracle directory which will point to the physical directory where picture or image file lies...
    For this you need create directory privillege
    Once you create the oracle directory..
    Please see my sample try
    create table sample_bfile(id number,photo bfile);
    insert into sample_bfile values (1,bfilename('<oracle_dir_name>','<file_name>');
    This will insert into the reference of the image in the column...
    But you cant select this column in sqlplus which u might be knowing...
    Then you can access the image with the front end
    Regards,
    Shasi

  • Need help with adding to String members[];

    Alright I am really confused about this now. lol.
    Here is what I am wanting:
    I need to get information from a txt file online, by rows, would look like this:
    iy1175696721
    yx1176164740
    xm1176351702
    I know I can do
    String members[] = {"iy1175696721", "yx1176164740", "xm1176351702"};
    But I want it to get that information from a txt file...
    Here is what I found so far
              URL memberList = new URL("http://www.example.com/text.txt");
              URLConnection mc = memberList.openConnection();
              BufferedReader in = new BufferedReader(
                                    new InputStreamReader(
                                    mc.getInputStream()));
            String inputLine;
            while ((inputLine = in.readLine()) != null)
             System.out.println(inputLine);

    Alright I am really confused about this now. lol.
    Here is what I am wanting:
    I need to get information from a txt file online, by
    rows, would look like this:
    iy1175696721
    yx1176164740
    xm1176351702
    I know I can do
    String members[] = {"iy1175696721", "yx1176164740",
    "xm1176351702"};
    But I want it to get that information from a txt
    file...
    Here is what I found so far
    URL memberList = new
    ew URL("http://www.example.com/text.txt");
              URLConnection mc = memberList.openConnection();
              BufferedReader in = new BufferedReader(
    new
    InputStreamReader(
    c.getInputStream()));
    while ((inputLine = in.readLine()) != null)
    System.out.println(inputLine);
    de]Okay, so if I had to take a guess at this, your problem is that you can't create the array before reading the file, because you don't know how many lines are in the file?
    You're best bet (unless the file is rediculously large) is to use an ArrayList so you can add the lines to the list one at a time, and the array list will take care of worrying about the size of the internal array.
    - Adam

  • Need help with different link styles on same page

    Hello,
    I'm using Dreamweaver CS4 on a PC.
    I have searched through a lot of posts over the last couple of days, I've tried the projectseven.com tutorial, google'd, etc. but still can't figure it out.....
    All I want to do is apply a different link colour to some links in the footer of my page. Elsewhere through the site I have set the colour to blue (for the link) and orange (for the hover) - for the footer links I want the link to be white and the hover colour to stay orange.
    The problem with the projectseven tutorial is that it doesn't seem to apply to CS4 and I kept getting error messages when trying to apply a new CSS rule - there's no Class|Tag|Advanced options as per the instructions ....
    I've copied the code of my page to this. The links which I want to apply a different style to are contained in the Div Tag called "Footer-Navigation-Bar" .
    Could someone please give me some instructions or point me in the right direction please??
    Many thanks,
    Vickie
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <!-- saved from url=(0014)about:internet -->
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- TemplateBeginEditable name="doctitle" -->
    <title>Subscribe to Family Australia - it's free!</title>
    <!-- TemplateEndEditable -->
    <link href="../family-subscribe.css" rel="stylesheet" type="text/css" />
    <script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <!-- TemplateBeginEditable name="head" -->
    <!-- TemplateEndEditable -->
    <style type="text/css">
    <!--
    a:link {
    color: #30C;
    text-decoration: none;
    a:hover {
    color: #F30;
    text-decoration: none;
    a:visited {
    text-decoration: none;
    a:active {
    text-decoration: none;
    -->
    </style></head>
    <body>
    <div id="container">
      <div id="banner">
        <ul id="family-subscribe-menu" class="MenuBarHorizontal">
          <li><a href="../index.html">Home</a>      </li>
          <li><a href="../subscribe.html">Subscribe</a></li>
          <li><a href="../family-advertise.html">Advertise</a>      </li>
          <li><a href="../family-articles.html">Articles</a></li>
    <li><a href="../family-sign-in.html">Issues</a></li>
          <li><a href="../family-contribute.html">Contribute</a></li>
    <li><a href="../family-contact.html">Contact</a></li>
        </ul>
    </div>
        <div id="sidebar"><a href="../family-sign-in.html"><img src="../images/launch-issue.jpg" alt="launch-issue" width="220" height="380" hspace="4" /></a>
          <div id="sidebar-image2">
            <p><img src="../images/Sleeping bag for web.jpg" width="220" height="151" alt="sleeping-bag" /></p>
            <p>Kozy Koala™ Pillow Sleeper is ideal for those  summer nights when the kids want to sleep out or when you go camping. The  all-in-one pillow camper consists of …. [MORE]</p>
          </div>
          <div id="sidebar-image3">
            <p><img src="../images/solrx for web.jpg" width="220" height="164" alt="sunscreen" /></p>
          SolRX® Sunscreens are very sweat and water  resistant – ideal for anyone who leads an active outdoor lifestyle … whether  you’re in the water or not! [MORE]</div>
      </div>
        <!-- TemplateBeginEditable name="main-content-region" -->
        <div id="main-content">main content</div>
        <!-- TemplateEndEditable -->
      <div id="footer">
    <div id="footer-navigation-bar"><a href="../family-about.html">about</a> | <a href="../family-advertise.html">advertise</a> | <a href="../family-contribute.html">contribute</a> | <a href="../family-contact.html">contact</a> | <a href="../family-unsubscribe.html">unsubscribe</a></div>
          <div id="footer-text">Family Australia | ABN 33150685385 | For all advertising enquiries please contact <a href="mailto:[email protected]">[email protected]</a><br />
    Copyright © 2010 Family Australia. All rights reserved.
    </div>
      </div>
      </div>
    </div>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("family-subscribe-menu", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    </html>

    The links which I want to apply a different style to are contained in the Div Tag called "Footer-Navigation-Bar" .
    a:link {
    color: #30C;
    text-decoration: none;
    a:hover {
    color: #F30;
    text-decoration: none;
    a:visited {
    text-decoration: none;
    a:active {
    text-decoration: none;
    Hello
    You can see above the CSS that applies to your links.  If you have links that you want to style in a diferent way, just write the rule Like this:
    #Footer-Navigation-Bar a:link {
    color: red;
    text-decoration: none;
    Or whatever.  There are other ways but this will do you as you already have those links you want styled differently in a div with its own ID.  The new rule should come after the other rules in your CSS I think to make sure of the cascade although thinking about it,  there's something called specificity in CSS which means that the rule that I suggest will win out anyway.  All that you are doing in my suggestion is selecting the a:link that is a descendant of an element with that particular ID.
    I hope that helps.  I'm a bit of a novice and might have got a bit jumbled with the cascade/specficity thing but hey, I reckon that will get you where you want to go....
    Martin.

  • Need help renaming a file to the same name as folder.

    I am looking to loop through a directory full of folders each containing one file. I am wanting to change each file name in each folder to the same name as the folder. The code compiles fine, it just never actually does anything. Here is my code.
    import javax.swing.JOptionPane;
    import java.io.File;
    public class filing
         public static void main (String [ ] args)
              File dir = new File("C:\\testing");
              File file;
              File cf;
              String dirs[ ] = dir.list();
              String folderName = "";
              if (dirs == null)
                   JOptionPane.showMessageDialog(null, "Directory does not exist", "I can't find it", JOptionPane.WARNING_MESSAGE);
              else
                   for (int i=0; i<dirs.length; i++)
                        folderName = dirs[ i ];
                        file = new File("C:\\testing\\"+folderName);
                        String changeFile[ ] = file.list();
                        cf=new File(changeFile[0]);
                        cf.renameTo(new File("C:\\testing\\"+folderName+".txt"));
              System.exit(0);
    }

    Nevermind. I figured it out.
    Instead of cf=new File (changeFile[0]);
    I added cf = new File ("C:\\testing\\"+folderName+"\\"+changeFile[0]);
    thanks anyway!

  • Need help for "From concatenate string insert to mysql table"

    Well, most of this problem is a question about SQL syntax. In the VALUES clause you put a comma delimited list of the values to go into the new record. You insert one record at a time. How are the columns defined? Have you done any study on basic SQL?
    Mike...

    i nid to insert values from concatenate string into mysql with using LabSQL, but the result come out from conatenate string is like " 2015-07-08 00:00:00 38.933235E-3" , a logged data of "Date Time Wind Speed(m/s). i nid to put these 3 values into 3 different column in mysql which is Date Time and Wind Speed. How can i pick Date to put inside Date's column, Time into Time's column and Wind Speed into Wind Speed's column in mysql ?
    What i do is
    INSERT INTO wind_speed_data (Date, Time, Wind_Speed) The space in Wind Speed can i put a _ in between Wind Speed? without _ and just put Wind Speed it shows errors.
    VALUES( i have no idea wat to key in at this part ) <--- nid help !
    The Mysql table. Date Time Wind Speed
    The result from concatenate string. Have to insert into mysql.
    My labview program.
    The error i facing.
     

Maybe you are looking for