Need some help troubleshooting this code

I have the following code in a JSP (HTML stuff edited out). If I run it as it is I get a blank page. But if I comment out the line that says "ruleName = rs.getInt("rule_name");" I am able to see the output of the prepared statement call. I need to see the results of both queries. Any ideas how I can fix this? Thanks.
<%@ page language="java" import="java.sql.*" %>
<%@ page import="oracle.jdbc.driver.*" %>
<%@ page import="oracle.sql.*" %>
<%@ page import="beans.*" %>
<%
Connection conn = null;
CallableStatement cstmt= null;
Statement stmt = null;
int ruleName = 0;
try {
//Build the database connection string
String SYSTEM_DB_DRIVER =
"oracle.jdbc.driver.OracleDriver";
String SYSTEM_DB_URL =
"jdbc:oracle:thin:@<db connection string>";
String SYSTEM_DB_FILE = "<db>";
String SYSTEM_DB_USER = "<user>";
String SYSTEM_DB_PASSWORD = "(passwd>";
Class.forName(SYSTEM_DB_DRIVER);
conn = DriverManager.getConnection(SYSTEM_DB_URL +
SYSTEM_DB_FILE, SYSTEM_DB_USER, SYSTEM_DB_PASSWORD);
System.out.println("creating stmt for rule name");                    
stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT DISTINCT MAX(TO_NUMBER(rule_name)) FROM rules WHERE product_id = CHR(" + prodId + ")");                    
ruleName = rs.getInt("rule_name");
System.out.println(ruleName);
// Prepare a PL/SQL call.
OracleCallableStatement call =
(OracleCallableStatement)conn.prepareCall("{ call wacc_eaicl_p_requirement.open_rules_dtl (:1,:2) }");
// Return the rules.
call.registerOutParameter(1, OracleTypes.CURSOR);
call.setInt(2, Integer.parseInt(prodId) );
call.execute();
ResultSet rset = ((OracleCallableStatement)call).getCursor(1);
System.out.println(prodId);
rs.close();
stmt.close();
conn.close();                                    
rset.close();
call.close();
conn.close();
catch(Exception e)
%>

Never mind. I fixed it. Silly me. Lesson learned: Use exceptions!

Similar Messages

  • Need some help for this code.

    Hi Everyone,
    I've test codes for east region and west region.
    I've a requirement to replace the west test id with east test id.
    That mapping has been done by the onshore team, I've got the mapping doc.
    But updating these details is a tricky part. It's nothing like direct update and replace those test codes.
    As per the mapping if it's
    In case of one to one (East - West) mapping which going to affect only a single row, I’ll have to update there,directly.
    In case of one – many (East - West) mapping and which is going to affect multiple rows, I’ll have to update the latest one and rest will be deleted only in that group. To identify the latest we have to check the latest order detail for that test.
    Suppose I've a west code named W123 and it has to be replaced with E123, in this case direct update.
    But now I've a transaction table where a patient has ordered multiple tests, In this case suppose the
    patiend id is P123 and ordered tests are W123, W234, W345; I'll have to update W123 as E123 and rest
    should not be deleted.
    But if I'll get multiple west code mapped towards single east code, the latest record as per the order detail needs
    to be updated and rest needs to be deleted if mapped with multiple west test codes, for single record and group record as well. Some thing like this.
    E123 - W123, W234 so I'll have to find out the latest and update there accordingly for single record and now
    patient has orderd multiple tests and the group record is like P123(patient) -----has orederd for W123, W234, W345.
    Now only the lastest test code suppose W234 has to be replaced with E123 and W123 has be deleted and W345
    should be there with E123.
    Now please see the code.
    CREATE OR REPLACE
    PROCEDURE P_UPDATE_TEST_ID AS
    V_EAST_TEST_ID            TEST_CODE_CONVERSION.EAST_TEST_ID%TYPE;
    V_ARRAY                   VARCHAR2(4000);
    V_COUNT                   NUMBER := 0;
    BEGIN
      FOR I IN (SELECT EAST_TEST_ID
                      ,STRAGG(WEST_TEST_ID) AS V_STRING
                FROM TEST_CODE_CONVERSION
                GROUP BY EAST_TEST_ID)
      LOOP
        V_EAST_TEST_ID            := I.EAST_TEST_ID;
        V_ARRAY                   := I.V_STRING;
        V_COUNT                   := V_COUNT+1;
        DBMS_OUTPUT.PUT_LINE('EAST_TEST_ID = ' ||V_EAST_TEST_ID|| ' || '||
                             'WEST_TEST_ID = ' ||v_array);
        Now after this I need to segregate the string values and check individual record
        and group record as well, for update. Now If I'll add the regexp_substr, then how
        to map those extracted values for checking.
      END LOOP;
      DBMS_OUTPUT.PUT_LINE('v_count = ' ||V_COUNT);
    END P_UPDATE_TEST_ID;Please suggest something.
    Regards,
    BS2012.
    Edited by: BS2012 on May 23, 2013 4:40 PM

    Hi Bawer,
    Thanks for your interest, but I've done that yesterday.
    Bawer wrote:
    Sorry, but
    >
    Here I'll have to check which one is the latest and update that with relative east test id ...
    >how do you describe the *'latest'* and *'relative east'* ?We have one more template table where we'll have to take the max of template_test_id to figure out "which one is the latest?" To identify the relative east we have a parent table named "test" from there we can find the relative test ids by the column name called East_west_ind (indicator); as per the mapping.
    and depending to this,
    >
    ... rest one has to be deleted and other should be untouched.
    >which one is here, in your sample to be deleted and which should be untouched?
    (maybe a sample after-update output?)If you see the patient id 93, we have number of tests has been ordered. But 3257, 3515 test ids are same as per the mapping. So we need to check the max of template_test_id to figure out "which one is the latest?" as we have one entry in template table always for a new order. In terms of that I'll have to update 3257 as it's the latest entry and 3515 has to be deleted and rest of the test ids should be untouched. I did it yesterday, but i couldn't respond you. Thanks once again for your interest.

  • Need some help with this code.

    var myDoc = app.documents[0]
    var mySel = app.selection[0]
    var myStory = mySel.parentStory; // Now we are pointing to the entire story
    var myHolidayStyle1 = "Holiday-Header" // Header 'day of the week'
    var myHolidayStyle2 = "Holiday-Sub-Heading-Date" // Header 'month and day'
    var myHolidayStyle3 = "Holiday-Header-Body" // Lead Paragraph 'default paragraph style'
    if (mystory = "Monday" ) {
        paragraphs(0).appliedparagraphstyles = myHolidayStyle1;
    else if (mystory = "Tuesday") {
        mystory.paragraphs(0). appliedparagraphstyles = myHoldiayStyle1;
    else if (mystory = "Wednesday") {
        mystory.papragraph(0).appliedparagraphstyles = myHolidayStyle1;
    else if (mystory = "Thursday") {
        mystory.paragraphs(0).appliedparagraphstyles = myHolidayStyle1;
    else if (mystory = "Friday")  {
        mystory.paragraphs(0).appliedparagraphstyle = myHolidayStyle1;
    else if (mystory = "Saturday") {
        mystory.paragraphs(0).appliedparagrahstyles = myHolidayStyle1;
    else if (mystory = "Sunday") {
        mystory.paragraphs(0).appliedparagraphstyles = myHolidayStyle1;
    // it finds if in the selection of the month and day if they equal for example Decmeber 15 then applies the HolidaySub-Heading-Date
    if   (mystory = "December 15") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 15") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 16") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 17") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 18") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 19") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 20") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 21") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 22") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 23") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 24") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 25") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    // If text doesn't  equal Day of the week like Monday and doesn't equal month and date like Decmber 14
    // then the document loops into doing the the rest of the document in Holiday-Header-Body
    // not sure if this loop will stop once it reaches another day of the week and then repeat the above tasks again.
    if (mystory =!  [myHolidayStyle0], [myHolidayStyle1]) { // not sure if I did this IF selection not equal Holidaystyle 0 and style 1 then perform loop, correctly???
        for (loop=0; loop<myStory.paragraphs.length; loop++)
      myStory.paragraphs[loop].appliedParagraphStyle = myHolidayStyle3;
    =============================
    ==========================
    I'm getting a error saying Paragraph is not a function, but nor is mystory.paragraph(0) , so i'm just trying to figure out what synax goes before that.
    =============================
    The text that is bold is the prolbem i'm having. I just got  a Javascript bible on how to program in javascript. How would i make that function work. I'm sure its simple. I'm just hoping I have If some Then ({) command follow by what I want it to do is correct. And I'm understanding this. there is so many different syntax's to choose from, any help would be appreciated. I work for a Newspaper company, and Indesign CS3 Javascript coding is a bit diffrent from normal javascript.

    Okie, I'm making progress now. Because well it didnt crash, but then again, LOL the script didnt apply the paragraph styles when I selected the text!
    any suggestions?
    I'm also getting a weird error now with the loop, but I also dont think its working because maybe the myStyle and myStle1 aren't applying themselves correctly, in the first part of the script.
    this is the Error Message:
    Error Number : 30477
    Error String: Invalid value of set propert 'appliedParagraphStyle'. Expected ParagraphStyle or String, but Recieved nothing.
    Line: 110
    Source: myStory.paragraphs[loop].appliedParagraphStyle = myStyle3;
    //var myDoc = app.documents[0]
    var mySel = app.selection[0];
    var myStory = mySel.parentStory; // Now we are pointing to the entire story
    var myStyle = app.activeDocument.paragraphStyles.item ( "Holiday-Header" ) ;
    var myStyle1 = app.activeDocument.paragraphStyles.item ( "Holiday-Sub-Heading-Date" ) ;
    var myStyle3 = app.activeDocument.paragraphStyles.item ( "Holiday-Header-Body" ) ;
    if (myStory.contents == "Monday" ) {
        myStory.paragraphs.appliedParagraphStyle = myStyle;
    else if  (myStory.contents == "Tuesday") {
        myStory.paragraphs[0]. appliedParagraphStyle = myStyle;
    if  (myStory.contents == "Wednesday") {
        myStory.papragraph[0].appliedparagraphstyle = myStyle;
    else if (myStory.contents == "Thursday") {
        myStory.paragraphs[0].appliedparagraphstyle = myStyle;
    if  (myStory.contents == "Friday")  {
        myStory.paragraphs[0].appliedparagraphstyle = myStyle;
    else if (myStory.contents == "Saturday") {
        myStory.paragraphs[0].appliedparagrahstyle = myStyle;
    if  (myStory.contents == "Sunday") {
        myStory.paragraphs[0].appliedparagraphstyle = myStyle;
    // it finds if in the selection of the month and day if they equal for example Decmeber 15 then applies the HolidaySub-Heading-Date
    if   (myStory.contents == "December 2") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 3") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if   (myStory.contents == "December 4") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 5") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if   (myStory.contents == "December 6") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 7") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if   (myStory.contents == "December 8") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 9") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if   (myStory.contents == "December 10") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 11") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if   (myStory.contents == "December 12") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 13") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if   (myStory.contents == "December 14") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 15") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if  (myStory.contents == "December 16") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 17") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if  (myStory.contents == "December 18") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else  if (myStory.contents == "December 19") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if  (myStory.contents == "December 20") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 21") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if  (myStory.contents == "December 22") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 23") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if  (myStory.contents == "December 24") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 25") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    // If text doesn't  equal Day of the week like Monday and doesn't equal month and date like Decmber 14
    // then the document loops into doing the the rest of the document in Holiday-Header-Body
    // not sure if this loop will stop once it reaches another day of the week and then repeat the above tasks again.
    // not sure if I did this IF selection not equal mystyle and mystyle1 then perform loop, is done correctly???
    if (myStory.contents !=  (myStyle && myStyle1)) {
       for (loop=0; loop<myStory.paragraphs.length; loop++)
      myStory.paragraphs[loop].appliedParagraphStyle = myStyle3;
        I'm truly grateful for the Support and Assistance everyone has been providing me, I'm learning, and I thank you all for your help.

  • Ok i have indesign CS6 and all files are stored on a 10.7.5 MAC server.  This just started happening.  When I open a file indesigns is creating a textfile in the same folder?  I need some help on this.

    Ok i have indesign CS6 and all files are stored on a 10.7.5 MAC server.  This just started happening.  When I open a file indesigns is creating a textfile in the same folder?  I need some help on this.

    Ask in the ID forum and be much more specific about your configuration. there could be any number of reasons why manifests, temp files or restore files are created.
    Mylenium

  • Error 1603: Need some help with this one

    When installing iTunes I first get an error box saying
    "Error 1406: Could not write value to key \Software\classes\.cdda\OpenWithList\iTunes.exe. Verify that you have sufficient access to that key, or contact your support personnel."
    The second one (after I click on Ignore on the last box) I get it this one:
    "Error: -1603 Fatal error during installation.
    Consult Windows Installer Help (Msi.chm) or MSDN for more information"
    Strange thing is that I do have full access to my computer (or atleast in all other cases I have had since I am the only one with an account on it).
    I have done my best in trying to solve it myself but I'm running out of ideas. I have downloaded latest versions from the website and tried installing Quicktime separately. I have also tried removing Quicktime using add/or remove programs though I just I didn't dare to take full removal because it said something about system files.
    Anyway I really need some help with this, anyone got any ideas?
    Greets,
    Sixten
      Windows XP Pro  

    Do you know how to count backwards? Do you know how to construct a loop? Do you know what an autodecrementor is? Do you know how to use String length? Do you know Java arrays start with index 0 and run to length-1? Do you know you use length on arrays too? Do you know what System.out.println does?
    Show us what you have, there isn't anything here that isn't easily done the same as it would be on paper.

  • HI again i need some help in this,bcz its urgent and i need a solution

    Hi All
      I have to dispaly the user exit of a particular IDOC and i have done the following process.
    1-I am entering the Message type in a parameter opeion than a i am getting the function module of that particulat message type through select statement from the table edifct.
    Now i cant able to understand how to get the userexit from that Function Module.
    If anybody ever face such kind or problem than plz give me some idea or give me some codes related to this.
    I got some help from SDM but that was not sufficient to move further from the point where i am stucking now.
    Thanks
    Mrutyunjaya Tripathy

    Hi,
    You have not mentioned which IDOC type and Function module you are looking. It might happen that user-exit is not provided in FM which you are looking.
    Go to display mode of required function module and search gloablly for string 'CUSTOMER-FUNCTION'. If you find one then your work is done. Also look of BADI's if there is any.
    I hope this will help you to look for your exit.

  • I have a iphone 4  and when i call people then cant hear me  and the mute is off ..  need some help with this problem

    i have a iphone 4 and when i call people about 70 percent of the time then cant hear me and the mute is not on ,  need some help

    Please see the  More Like This  section on the right.

  • Need some Help on this peculiar issue.

    The following code is there in Controller Servlet.
    Sometimes in a very random fashion this code fails.
    The code is as follows.
    ========================= CODE START =========================
    public void doPost
    (HttpServletRequest objRequest, HttpServletResponse objResponse) {
    navigate(objRequest, objResponse);
    private void navigate
    (HttpServletRequest objRequest, HttpServletResponse objResponse) throws IOException,ServletException {
    try {
    System.out.println("strFromScreen : '" + strFromScreen + "' strAction : '" +
    strAction + "'");
    objEpsNavigation = hashLookUp(strFromScreen, strAction);
    if (objEpsNavigation == null) {
    strErrorJSP = "jsp/EpsErrorPage.jsp";
    CMUtility.log("Navigation Object is not created");
    displayErrorPage
    (objRequest,objResponse,"Navigation Object is notcreated !!");
    return;
    ========================= CODE END ==========================
    System.out.println("strFromScreen : '" + strFromScreen + "' strAction : '" + strAction + "'");
    The above line in the code is printing null. Not everytime. Very often suddenly it gets null value and hashLookUp(strFromScreen, strAction) returns null object.
    So, system shows the error page with error message "Navigation Object is notcreated !!".
    Please help me in this regards.
    It is not happening regularly, it's happening randomly.
    Thanks in advance.
    - Pratip

    Where have you defined and assigned values to 'strFromScreen ' and 'strAction' .
    If these are instance variables then, unless you have instructed the servlet engine to create a new servlet instance for each request, near simultanious requests will interfer with one another.
    It is normal to make servlets thread safe which, as a starting point, normally means no instance variables.

  • Need some help with this project (methods)

    Ok. in this project it states the following:
    Write an application that rolls a die and displays the reuslt. Let the user pick the number of sides on the die. Use the Die Class to represent the die in your program.
    This is what i have so far, but im confused on how to utilize the Die class because it keeps giving me errors:
    P4_3.java:
    Code:
    import cs1.Keyboard;
    import java.util.Random;
    // extends the Die class...
    public class P4_3 extends Die
    public static void main (String[] args)
    { // asks the user how many sides of the die there is.
    int userSides;
    System.out.println("How many sides of the die do you want?");
    userSides = Keyboard.readInt();
    System.out.println ("You rolled "+Die.die);
    }Die.java:
    Code:
    // the die class
    import cs1.Keyboard;
    import java.util.Random;
    public class Die extends P4_3
    public static void Die()
    // rolls the dice
    Random generator = new Random();
    int die;
    die = generator.nextInt(P4_3.userSides) +1;
    }It keeps giving me:
    cannot resolve symbol
    symbol : variable die
    location: class Die
    System.out.println ("You rolled "+Die.die);
    ^
    cannot resolve symbol
    symbol : variable userSides
    location: class P4_3
    die = generator.nextInt(P4_3.userSides) +1;Can somebody point me in the right direction?
    Thanks, ps2cho
    (PS: Please keep it as simple as possible, dont give me some crazy wacky tough code because i wont understand a word of it, no matter how hard you try to explain it. Simple simple simple!)
    Thanksss

    import java.io.*;
    import java.util.Random;
    public class DieTest
        public static void main(String[] args)
            boolean more = true;
            BufferedReader br = null;
            try
                br = new BufferedReader(
                     new InputStreamReader(System.in));
                while(more)
                    System.out.println("enter number for die sides, \"q\" to quit");
                    String line = br.readLine();
                    if(line.equalsIgnoreCase("q"))
                        break;
                    int sides = Integer.parseInt(line);
                    Die die = new Die(sides);
                    for(int j = 0; j < 5; j++)
                        System.out.println("die roll " + (j+1) + " = " + die.roll());
                br.close();
            catch(IOException ioe)
                System.err.println("read error " + ioe.getMessage());
                more = false;
    class Die
        int sides;
        Random seed;
        public Die(int n)
            this.sides = n;
            seed = new Random();
        public int roll()
            // 0 <= seed.nextInt(sides) <= sides-1
            // 1 <= return value <= sides
            return 1 + seed.nextInt(sides);
    }

  • Need some help with this Design.  Not sure if it can be done.

    I am a full time RVer. I have a complex system installed in my RV. I am trying to share a wireless or use my AE to feed internet to the devices in my rack and allow my Apple TV to connect to my MBP over gigabit for streaming reasons.
    Is there a way to share my internet to the AE so that it will feed the 3 ports? Can I somehow connect to a hotspot and share that internet connection to the other devices on my network wired and wireless?? I am mainly concerned with getting internet to the ATV while connected to it via ethernet for the gigabit connection.
    It seems that I can connect the AE to a hotspot or WAP, but then I loose the ability to turn bridged mode off so that it will hand out DHCP ip addresses to the ethernet devices. I cannot extend any network unless the hotspot is using an apple device for its WAP. This is what apple told me when I was trying to extend my Linksys WAP4400N.
    Any ideas or advice here would be great. I am just stuck for a solution to what I want to accomplish.
    Thanks

    One possible solution....(if I understand correctly what you're trying to accomplish with what you have to work with) I'm assuming that the Linksys has no internet connection in the RV and isn't really needed in my idea below.....or do you have a satellite connection (or some other internet source besides a public wireless network?
    You could have your MBP join the wireless network, set up internet sharing (see OS X help) and share from airport to ethernet, connect an ethernet cable from MBP to WAN port on the Extreme, set the Extreme's connection sharing to "share a public IP", ignore the double NAT error (or you may be able to bridge it, I can't remember if the MBP will hand out several IPs but I think it will), and plug your Apple TV into a LAN port on the Extreme. Come to think about it, you really don't even need the Extreme unless you need other clients to connect, just plug the Apple TV into the MBP.
    hope it helps

  • Concentric Circles---I need some help on this one...

    I'm trying to figure out how to change the color of my concentric rings. Here is my code:
    import java.applet.*;
    import java.awt.*;
    public class SvnRings extends Applet {
    public void paint(Graphics g) {
    int RectLeft, RectTop, RectHeight, RectWidth;
    int AppletHeight = this.getSize().height;
    int AppletWidth = this.getSize().width;
    for (int i=8; i >= 0; i--) {
    if ((i % 2) == 0) g.setColor(Color.red);
    else g.setColor(Color.white);
    RectHeight = AppletHeight*i/8;
    RectWidth = AppletWidth*i/8;
    RectLeft = AppletWidth/2 - i*AppletWidth/16;
    RectTop = AppletHeight/2 - i*AppletHeight/16;
    g.fillOval(RectLeft, RectTop, RectWidth, RectHeight);
    Can anyone tell me what I am forgeting?

    Well, what colours do you want them to be?
    You could generate them randomly, based on a sequence or from an array. I'll do the latter 'cos it's easiest.
    // 9 colours (for the 9 rings)
    private Color[] colors = new Color[] {Color.RED, Color.ORANGE, Color.YELLOW, Color.GREEN, Color.BLUE, Color.CYAN, Color.PURPLE, Color.PINK, Color.WHITE};
    for(int idx = 8; idx >= 0; idx--) {
      g.setColor(colors[idx]);
    }If you want a mathematical approach then you've got to create a new color in each iteration of the loop based on the loop value.
    Hope this helps.

  • Need some help in QR Code generation process

    Hi All, Actually I placed this query before. But I have not got usefull messages.
    But When I go through the below link I got hopes that I can crack this QR Code requirment but
    https://www.sounderp.com/index.php/howto/38-faq/53-2dmatrixbarcodes
    I need the IDAutomationDMatrix.ttf file
    and
    Please let me know how can I download Java Class Encoder\com or the Java Encoder contents.
    Thanks

    Hi All, Actually I placed this query before. But I have not got usefull messages.
    But When I go through the below link I got hopes that I can crack this QR Code requirment but
    https://www.sounderp.com/index.php/howto/38-faq/53-2dmatrixbarcodes
    I need the IDAutomationDMatrix.ttf file
    and
    Please let me know how can I download Java Class Encoder\com or the Java Encoder contents.
    Thanks

  • HT5654 After updating iCloud application on Vista I am unable to access iTunes, I get the following message: (Need to reinstall application, APSDameon.exe, MSVCR80.dll cannot be found)    I need some help rectifying  this issue because I cannot reinstall

    Hello,
    I have installed the update that was sent on or around January 24th - 26th 2014, after the failure of the apple iTunes update the iCloud update was installed.  Ever since these 2 updates I am unable to open iTunes and I receive the following message: (need to reinstall iTunes application, APSDameon.exe and MISVCR80.dll cannot be found).  I have tried reinstalling iTunes and cannot do so, I really do not want and cannot afford to restore my pc to a previous date because of new data on my PC.  I am requesting assistance from support so that I can rectify this issue, thanks in advance for any assistance you may provide.    

    Go to Control Panel > Add or Remove Programs (Win XP) or Programs and Features (later)
    Remove all of these items in the following order:
    iTunes
    Apple Software Update
    Apple Mobile Device Support (if this won't uninstall move on to the next item)
    Bonjour
    Apple Application Support
    Reboot, download iTunes, then reinstall, either using an account with administrative rights, or right-clicking the downloaded installer and selecting Run as Administrator.
    The uninstall and reinstall process will preserve your iTunes library and settings, but ideally you would back up the library and your other important personal documents and data on a regular basis. See this user tip for a suggested technique.
    Please note:
    Some users may need to follow all the steps in whichever of the following support documents applies to their system. These include some additional manual file and folder deletions not mentioned above.
    HT1925: Removing and Reinstalling iTunes for Windows XP
    HT1923: Removing and reinstalling iTunes for Windows Vista, Windows 7, or Windows 8
    tt2

  • Need Some Help with my code

    Hey guys;
    Here is my problem:
    I have a detailed query, but for argurments sake and to keep it simple let's just say it is this:
    select a.acct_number, s.service_id, s.service
    from account a, service s
    where s.acct_number = s.acct_number
    and s.service = 'ELECTRIC';
    So this part of my problem i have working ok.
    BUT, what i now need is to take these results above and search through only the returned data.
    So i need all the accounts above that are active between say an effective_date of Jan 1, 2007 and April 30, 2007
    What is the best way to do this:
    Should i do it right in my SQL code, or would it be better to setup a cursor and do it through PL/SQL Developer?

    So this part of my problem i have working ok. I doubt it, you have a Cartesian product here (your 2 tables are not joined, I'm assuming that it's a typo
    So i need all the accounts above that are active between say an effective_date of Jan 1, 2007 and April 30, 2007Unfortunately you have over simplified your issue. It is impossible to answer without making guesses. Do you even have columns which indicate whether a record is active or not, or a date column for your rows?
    Should i do it right in my SQL code, or would it be better to setup a cursor and do it through PL/SQL Developer?
    If possible, use SQL.

  • I have set a new password today and i cant remember it cause the password i used to get access to my phone is a very hard one to remember i need som help cause this is the first time ever i have encounter

    if anybody can help i would appriecent it cause earlier this morning a deaf guy came across my phone and got access to it so i changed it a few times till i decided to create a hard password that nobody cant remember but since i was being a dumbasss for it i guess its my fault

    LOST PASSCODE
    You should be able to remove the passcode by restoring the device.
    Connect the device to the computer with which you normally sync and open iTunes.
    Note: If iTunes prompts you to enter the passcode, try another computer that you have synced with. Otherwise, go to "If you have never synced your device with iTunes", below.
    Right-click the device in the left column and select Back up.
    When the backup is complete, select Restore.
    When finished, restore from your most recent backup.
    Otherwise read this
    If that doesn’t work  you will need to perform a factory restore to remove it. Or read:
    Enter Wrong passcode
    http://support.apple.com/kb/ht1212

Maybe you are looking for