Init-problem in swich-case

I have to init the "a1" and "k" inside the if-advise, but I want use it outside the if-advise, too and there he can't resolve symbol....
case 1:
if(a1 == null){
//there is my problem!!!!!!!!
a1 = new String[100];
int k=0;
a1[k] = testResponse.substring(0,10);
System.out.println(a1[k]);
k++;                         
break;

perhaps it would be easier if there is a way to append String to an array like StringBuffer.append(String) or in "php" array[] .= string (there it gets the last index of the array, iterates it and then automatically appends the string..)
maybe if have to think about a completely different way to solve my problem...
String[] a0,a1;
switch(x){
case 0:
if(a0 == null){
a0 = new String[100];
int k1=0;
a0[k1] = testResponse.substring(0,10);
k1++;
break;
case 1:
if(a1 == null){
a1 = new String[100];
int k2=0;
a1[k2] = testResponse[i].substring(0,10);
k2++;
break;

Similar Messages

  • Problems with use cases in JDeveloper 11.1.1.1.0

    Use cases made with JDeveloper 11.1.1.0.2 can not be used and edited in JDeveloper 11.1.1.1.0.
    Same problems with Use Case Diagrams.
    And it seems to be impossible to create new use cases in JDeveloper 11.1.1.1.0.
    What are the differences between 11.1.1.0.2 and 11.1.1.1.0 if you look at use cases??

    In JDeveloper 11.1.1.0.2 each use case has one file with the folllowing name: *.xhtml_usc.
    In JDeveloper 11.1.1.1.0 each use case has two files with a names like *.xhtml_usc and *.uml_usc (after standard migration with JDeveloper). I can still edit the *.xhtml_usc files, but I have no idea what to do with the *.uml_usc files. I can only open a Property-editor, but the properties I see have no relation with the text I used in my original use cases . New use cases only have a *.uml_usc file and a Property-editor. In javadoc the new use case does not appear.
    My question is: why do I have two different use case files in JDeveloper 11.1.1.0 and how can I use the Property editor??

  • FULL and INIT problem

    Hi,
    I am loading data to ODS.First I shceduled a FULL and when I tried to go for INIT it is not allowing.Why is this?

    Hi,
    In case of ODS, it is not possible to load init if already full load is there and viceversa. If u want to run init, first convert all the request in ODS to repair full request from program RSSM_REPAIR_FULL_REQUEST_ALL in se38. Then try to run the init.
    Hope this helps in solving u r problem
    Regards
    Ramakrishna Kamurthy

  • SQL query problem - select max (case... aggregate function)

    Hi,
    I have a problem with below sql query, it gives me problem/error message 'ORA-00937: not a single-group group function', why?
    select sag.afdeling, sag.sagsnr, to_char(sag.start_dato, 'yyyy-mm-dd'), sag.stat, BOGF_TRANS.TRANSTYPE,
    max (case when BOGF_TRANS.TRANSTYPE = 'K' then sum(bogf_trans.belobdkk) end) + -- as "TRANSTYPE K",
    max (case when BOGF_TRANS.TRANSTYPE = 'D' then sum(bogf_trans.belobdkk) end) as "TRANSTYPE K & D",
    max (case when BOGF_TRANS.TRANSTYPE = 'S' then sum(bogf_trans.belobdkk) end) as "SUM TRANSTYPE S"
    from sag
    join bogf_trans on sag.selskab = bogf_trans.selskab and sag.sagsnr = bogf_trans.sagsnr and sag.afdeling = bogf_trans.afdeling
    where SAG.SELSKAB=37 and SAG.AFDELING = 'SUS' AND SAG.SAGSNR = 10876
    group by sag.afdeling, sag.sagsnr, sag.start_dato, sag.stat, BOGF_TRANS.TRANSTYPE
    If I exclude (columns) as below it give me correct summations (max (case... sum(...)) but then I miss some important info that I need
    select
    max (case when BOGF_TRANS.TRANSTYPE = 'K' then sum(bogf_trans.belobdkk) end) + -- as "TRANSTYPE K",
    max (case when BOGF_TRANS.TRANSTYPE = 'D' then sum(bogf_trans.belobdkk) end) as "TRANSTYPE K & D",
    max (case when BOGF_TRANS.TRANSTYPE = 'S' then sum(bogf_trans.belobdkk) end) as "SUM TRANSTYPE S"
    from sag
    join bogf_trans on sag.selskab = bogf_trans.selskab and sag.sagsnr = bogf_trans.sagsnr and sag.afdeling = bogf_trans.afdeling
    where SAG.SELSKAB=37 and SAG.AFDELING = 'SUS' AND SAG.SAGSNR = 10876
    group by sag.afdeling, sag.sagsnr, sag.start_dato, sag.stat, BOGF_TRANS.TRANSTYPE
    Any ideas?

    Moved to more sutable forum, sorry.

  • Problem in APDU-case 1:No command,no response

    Hello evrybody.I have done a method in my java card applet which does not return any command data neither response data.
    I wrote in my APDU script the following(as defined the case 1 in the Zhiqun Chen's book-page 102,says that "P3(the 5th field in the APDU buffer) has to be 0"):
    //CLA INS P1 P2 P3
    0xB1 0x50 0x00 0x00 0x00;
    Howevr, the executed APDU script returns me the following:
    com.sun.javacard.apdutool.ReaderWriterError: Encountered ";" at line 105, column
    25.
    Was expecting one of: <INTEGER_LITERAL> ...
    <CHARACTER_LITERAL> ...
    <STRING_LITERAL> ...
    I have tried to add another 0x00 byte at the end of the above script line, as follwoing:
    //CLA INS P1 P2 Lc Le
    0xB1 0x50 0x00 0x00 0x00 0x00;
    //WIth the idea that Lc=0(no command data) and Le=0(no response data)
    I noticed that the method is working properly(does the work that has to do;I tested and I am definetely sure) but on the other hand the executed APDU script returns as SW1 SW2 the following:
    CLA: b1, INS: 50, P1: 00, P2: 00, Lc: 00, Le: 00, SW1: 6f, SW2: 00 (!!!!)
    Actually,I was waiting for SW1 SW2 == 90 00.
    I do not know why this is returned.
    Do you know what it is going wrong?
    I will appreciate any help and guidance.
    Thank you for you time.

    I will give the code of my function.I think the problem is in the code of this method(function).I will give you in order to have a look at it:
    private void delete_all_records(APDU apdu)
         ver_pin();
         byte[] buffer=apdu.getBuffer();
         byte get_P1=buffer[ISO7816.OFFSET_P1];
         byte P3=buffer[ISO7816.OFFSET_LC];
         //Check the appropriate syntax
         if (get_P1!=(byte)0) // || (P3!=(byte)0) )
         ISOException.throwIt (SW_SYNTAX_DEL_ERROR);
    // else
         //Delete all the record.This for loop
         //deletes all the records' ids.
         for (short i=0;i<kostas.length;i++)
         kostas[(short)i].record_id=(byte)0;
    I did not use any of the functions such as sendBytes() or apdu.setIncomingAndReceive because I did not want to take data either to return response data.Do you have any idea what's going on?
    I will really apprecitae any help.Thank you for your time.

  • Problem with a case structure

    I have the following problem:
    I want that the structure from the TRUE case of the bigger case structure to start only when I switch from the button and activate the TRUE position. I observed with the probe tool that the structure is still executed in backgroun even if the bigger case is on FALSE. I want to make it start from the first position (the default case) of the inner case structure whenever I will switch from the button. I hope I made myself cleared. Thanks
    Solved!
    Go to Solution.
    Attachments:
    Untitled 3.vi ‏77 KB

    Hi maryus,
    your observation (or better assumption) is wrong.
    As long as you set your button to FALSE the inner case structure in the TRUE case is not executed!
    But: when you switch to TRUE case you wired the loop iterator to the inner case selector. So the inner case structure is not starting with it's first case but with the case corresponding to loop iteration count!
    You can see all this by using execution highlighting!
    Btw. when you have several cases in a case structure you can combine them to one case. It's all explained in the context help of the case structure! So you can combine cases (1, 3,4,6) and (2,5,7) into just one case each…
    Edit: Damn, Christian was faster (with same conclusions)…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Delta INIT problems in production system

    hi!
    How do you do, I hope all fine, well, I have a problem in production system, I execute the delta init and the data is in BW the problem is when I want to activate the data, the system give me a processing error, somebody can helpme please?
    BR

    Hi
    Please check with your Basis team to confirm there are enough resources.
    Also Check what is max work process time . Tcode RZ11 parameter rdisp/max_wprun_time
    Check this thread which mentions a lot of related notes.
    Link: [Re: DSO-data activation issue;
    Regards
    Sanjyot

  • Problems with Upper Case Letters on Keyboard

    Suddenly my keyboard will not print a capital i. in fact, if i use the caps key, it won't even put the letter i in either upper or lower case. When i put the caps lock on,  can get a capitol 'I', but once the cap lock is off it is back to the lower case i again.
    is there anything  i can do to correct this, without taking my computer keyboard in for service?  i broke my neck about 3 weeks ago and i am house bound for the next 5 weeks.
    Sheila K.

    Hey Sam,
    im having the very same problem even though iv only had my ibook g4 for just under 5 months. i believe that puts me still under the 1 year warrenty for the computer itself. will they still replace the keyboard if this is the case. if they decide not to do so. i was wondering if anyone here new the part number for the keyboard that is easly installed on the g4 ibooks. if anyone here knows anything on the matter please feel free to email me on this.
    as most people can see, i also have a power mac g5 desktop, otherwise called a cheese grader. if you know what i mean. theres very little i dont like apples computers. thats probally why everything in my house is mac related. having 3 ipods, 1 g4 ibook, a power mac g5, isight cam, and lots more. the point here is in the event people are trying to decide what kind of coomputer there wanting to buy. several things need to be considered before you should go out and buy one. obviously price has alot to do with your choice, but in that decision you must also consider whether or not the computer has teachnical type issues. is the company well known for having lots of problems. will you be able to get the technical support you need in the event there is some major problem with the computer that you may be inquiring on. having the apple care protection plan on all of apple's top computers is the single one thing that people dont think about when buying a new brand name computer. i cant tell people enough that buying this apple care plan is vital to the survival of you and your new computer. an extra $200-$400 is well worth the expense down the line.

  • Preventing Multiple Init problem

    Hello,
    This is something I should already now, but I have myself stumped.
    I have a servlet that has some static instance variables to some singleton objects, and some Strings and some other objects, which get initialized in the init() method when my servlet gets loaded. When another instance of my servlet is created, I don't want it to re-initialize those objects. For most of them it would be okay, but there are a few that would cause problems. So, I was wondering what would be a good way to ensure that a servlet only initialized certain instance variables once, and any future servlet instances would skip that initialization and use the values that were already initialized by the first instance? I wrote the following test program:
    public class TestBool
         static boolean testBool;
         static String testString;
         public static void main(String[] args)
              Thread main = Thread.currentThread();
              System.out.println( (testString == null ? "true":"false") );
              testString = "no";
              try
                   main.sleep(30000);
              catch(Exception e)
                   e.printStackTrace();
    }I then ran it once, then ran another instance of it, but the second instance seems to reset that testString to null when it runs, so they both output "true"... I am also assuming that both instances I ran were running in the same JVM. So, I am assuming the same thing may happen to my servlets. Any advice and/or expertise would be greatly appreciated! Thanks!

    I am using a multi-threaded servlet, but from my
    understanding, it is still possible to end up with
    more than one instance of a multi-threaded servlet if
    there is enough load on the server that it needs to
    create another instance to serve all the requests.
    (Let me know if that is incorrect).According to the servlet spec, the container must use only one instance of a multi-threaded servlet class. Load does not impact this because the server can create more threads - another instance would not help. However, it's probably safer to code defensively because it's possible that your servlet could be changed later to a single thread servlet and who knows if all servlet engines follow the spec.
    I guess
    my real question is, when it goes to create another
    instance... will the static declarations reset the
    references to null, or should I be able to check if
    fooString is null and skip initialization if it is not
    null?The static declarations are initialized when the class is loaded, so object creation has no impact. To be super-safe, you should synchronize the code that initializes the variables. In my previous post I synchronized on the object but it should have been on the class.
    public void init(ServletConfig config) throws ServletException {
          if (fooString == null) {
                synchronized (FooServlet.class)
                    if (fooString == null) {
                        fooSingleton= SingletonClass.getInstance();
                        fooString = config.getInitParameter("fooValue");
    }All of this is probably more safety than you need! There should be only one instance of the servlet, and this code handles multiple instances being created concurrently. As long as the app is not distributable across multiple JVMs, then you should be ok.

  • Hello all i am facing problem in manufacturing case

    hii experts
    well i am implementing SAP in manufacturing company .i am stuck in one case when one item which is originally produce  by
    one of the manufacture company and that company sale  that item to dealer  with cenvat value (because item is excisable ),and my company purchase that item from dealer .and  the cost of item include Cenvat in there basic price and dealer charge that item with VAT only .so my company claim Cenvat with original value which  was set by first manufacture company .so what shoud i do now ? how would i make PO which include right cenvat and vat also ?
    please help me
    thanx in advance

    Hi Sahil.....
    I think you are going in a different direction from what experts are trying to suggest you.
    Have you tried below?
    1. if (AssessableValue > 0)
    { BED_BaseAmt = AssessableValue*Qty }
    else
    { BED_BaseAmt = Total }
    BED_TaxAmt=BED_BaseAmt*BED_Rate
    For eCess
    2. Cess_BaseAmt=BED_TaxAmt
    Cess_TaxAmt=Cess_BaseAmt*Cess_Rate
    For HCess
    3. HSCess_BaseAmt=BED_TaxAmt
    HSCess_TaxAmt=HSCess_BaseAmt*HSCess_Rate
    for VAT on CenVAT
    4. VAT_BaseAmt=Total
    VAT_TaxAmt=VAT_BaseAmt*VAT_Rate
    In Your transaction there must be two Unit Prices.
    one from dealer on which VAT is applicable and other (Assassable value) from direct manufacturer on which Excise Duty is applicable if I'm not wrong.
    In that case you have to put Unit from Dealer in Unit Proce Column and price on which Excise is being calculated should be put in Assassable Value INR column (Activate from form setting if disabled).
    Now when you create and apply above combination of tax.
    Hope it will solve your problem....
    Regards,
    Rahul

  • CFC Init problem

    I'm trying to create a cfc in my application scope but the
    variables I set in the init method don't seem to be persistent.
    Here is the init method:
    <cfcomponent displayname="coupons" hint="Checks validity
    and type of coupon and applies it to order."> <cffunction
    name="init" access="public" output="false" returntype="coupon">
    <cfargument name="ds" required="true" type="string" <cfset
    variables.ds=arguments.ds> <cfreturn this>
    </cffunction>
    Here's the call in the Application.cfc
    <cfset Application.coupons = createObject("component",
    "coupon").init(application.admin.ds)>
    Here is the method that throws the "variables.ds not defined
    error"
    <cfstoredproc procedure="pr_getCouponList"
    datasource="#variables.ds#" debug="Yes"> <cfprocparam
    type="In" cfsqltype="CF_SQL_INTEGER" dbvarname="@Active"
    value="#arguments.Active#" null="No"> <cfprocparam type="In"
    cfsqltype="CF_SQL_VARCHAR" dbvarname="@Sort"
    value="#arguments.gridSortColumn#" null="No"> <cfprocresult
    name="getCouponList" resultset="1"> </cfstoredproc>

    On Tue, 24 Jun 2008 05:22:30 +0000 (UTC), athanasiusrc wrote:
    > Okay, I figured out the problem but don't know the
    answer. I am getting this
    > problem when I try to bind the cfc in a grid because the
    grid is binding a new
    > copy of the cfc instead of the one created in the
    application scope:
    >
    > <cfgrid format="html" name="getCouponList"
    pagesize="#attributes.pageSize#"
    > selectmode="row"
    >
    >
    bind="cfc:cfcs.coupon.getCouponList({cfgridpage},{cfgridpagesize},{cfgridsort
    > column},{cfgridsortdirection},{active})">
    >
    > It works if I call it through an invoke command.
    >
    > The problem I have now is, how can I bind a cfc in a
    scope?
    I'm not sure how to use a variable instead of a CFC in a bind
    statement (I
    don't do much UI type development, so have never needed to
    know); however
    your init() method in your CFC could look to see if there's
    an instance of
    itself in the application scope and if so return that instead
    of a new
    instance of itself. Then you chain your method call thus:
    cfcs.coupon.init().getCouponList(etc...)
    Adam

  • Inventory Init Problem

    Hello
          I have some problem for Init request,there is very much data while data schedule in BI side.and i have only 3 to 4 hours to take init and data fill from setup table to bi(Schedule).so what i do.kindly provide solution for that problem

    Hi,
           Generally, you need to parallelize your init ranges first in R/3.   You can follow the same in BW Infopackages by doing multiple init with different ranges, so that the jobs can parallely run.  There is one more scenario wherein you can do Init without data transfer in BW (given that you have done your Init with some ranges in R/3 Side to fill setup tables) and continue your deltas.  Then perform your full loads with some ranges to run in parallel when there is smaller load on servers.  Finally do the repair full request and continue your deltas.  Hope it should provide you some answers of minimizing your down time.
    Thanks
    Kishore

  • Archiving in R/3 - Impact in BW?  How to solve Init-Problem?

    Hello,
    following question: currently we think about an R/3 Archiving Projekt.
    In scope we have different archiving objects. Now I have concerns
    when we do an re-initalization on BW side.
    I thought about a second ODS-Object (= Backup ODS). Where I run a
    selective deletion job in order to have the init run double. When then we have to re-init. I can "move" my init.-request from the backup ODS to my "reporting" ODS.
    Somebody got another idea how to solve delta /init. runs in BW linked to archiving objects?
    (For full-updates directly to Cube I can select - e.g. Fisc.Year/Period.)
    Any input is welcome.
    Thanks in advance.

    Hi Pascal,
    your idea to have a back-up ODS with all the R/3 archived data is good, so, when you have to delete the original ODS content and then you have to/can re-init it only with the available data in R/3 (without the archived object), you can use the back-up ODS in order to refill your reporting ODS with the archived data.
    This is good if you want:
    - to make (and maintain) all archived data available for reporting
    - to preserve the same granularity
    Otherwise, you can store in BW all the R/3 archived data in another object and then you can use a multiprovider to make your reporting (in this case you have to copy your query from an infoprovider to the multiprovider).
    Considerations about the data redundancy (and related disc space) have to be done in the solution analysis phase.
    Consider also that for the LBWE extractors (you can check this in the OLI* transaction for the setup jobs), you have the possibility to reload your archived objects..in this case you don't need to create a backup ODS.
    Hope it helps (and don't forget to assign some points by clickin'on the yellow star for each reply of the contributors that help you !)
    Bye,
    Roberto

  • [solved]Anybody ever had a problem with a case making it difficult to charge?

    I purchased a gently used ipod 4g from eBay.  I was pretty thrilled with it. It was still new enough to have some limited warranty time left.  Dec 23.  I experimented with different apps for a couple of days.  I had to recharged it once.  No problem.   I purchased a gel case with a screen protector, so it didn't get it scratched, or beat up.  I set it up and it was looking pretty nice.  It was a clear gel case so it didn't alter the look at all.  I installed some more apps and read some ipod tutorials.  I installed mo gv app and found I had an iphone 4 with a free cell phone contract.  I needed a second charge. I plugged it into my wall outlet adapter..  After 4 hours nothing.  I changed the wall outlet.  After 4 hours nothing.  I thought I was having a cord problem because my ipod would neither charge nor mount as a flash drive on my computer usb port.  I googled ipod trouble shooting and was advised to do the things that I had done & 1)reset it, and if that didn't work  2)buy a new cord.  If that didn't work, use the apple limited warranty and get them to fix or replace.   I did 1) and 2).  Nothing.  I was very desperate and getting ready to send it back to apple.  Then it struck me that the only thing that had changed physically to the ipod since I last charged was putting on the case.  I wondered if the case was interfering in some way.  I took it off and put on the cord and plugged into the old wall adapter outlet.  This worked, now my ipod is charged.  I also found that I could charge with the case on if I pulled the front of it up a little before putting on the cord.  Problem fixed.
    I guess I am writing this hoping it might save someone else the aggravation of sending an ipod to get if fixed only to be told there is nothing friggen wrong with it.  Maybe this should be added to the online troubleshooters?.

    Richard,
    Install the latest fix pack i.e. FP 3 for Xcelsius
    Description:
    URL Button component does not open a new browser window when the Trigger Behavior functions are enabled.
    New Behavior:
    This issue has been resolved.
    Hope this helps...
    -Anil

  • Problem: Wiring Praetorian Case to Neo4 Platnium MOBO

    I'm new to this computer building thing, so bear with me.
    I recently received my components for my new computer.  Everything seems to be going well, except that I am having difficulty understanding the case wiring and how it interfaces/plugs-in to the MOBO.  MSI has a pretty good detail in their documentation of what is required, but the case I bought has next to none.
    This particular Praetorian Case has the following:
    Power button:  Blue/White wires
    Power LED: Green/White wires
    HDD LED: Orange/White wires
    Reset button: Grey/Grey wires
    This maybe so basic it will totally expose me as a newbie, but how do I know which of these wires are which, with respect to the MOBO's wiring diagram?
    The MOBO has the following:
    JFP1
    1   Hard Disk LED pull-up  (would it be orange or white?)
    2   MSG LED pull-up  (would it be green or white?)
    3   Hard Disk active LED (would it be orange or white?)
    4   MSG LED pull-up  (would it be green or white?)
    5   Reset Switch low reference pull-down to GND (Which Grey wire?)
    6   Power Switch  high reference pull-up (would it be blue or white?)
    7   Reset Switch high reference pull-up  (Which Grey wire?)
    8   Power Switch low reference pull-down to Gnd  (blue or white?)
    9   Reserved do not use
    This is how I would have guessed to wire it 
    1 Orange
    2 Green
    3 White
    4 White
    5 Grey ???? 
    6 Blue
    7 Grey ???? 
    8 White
    9 Not in use
    In advance, thanks for your insight.
    Also: what do I risk by doing this incorrectly?

    Yeah, I've been to the Cooler Master website already.  Let me tell you, there is way less information behind their links than you might expect.  For example, the forum link is not what I would call a very interactive lead.  It is more like a FAQ, which only covers 3 questions.
    The setup directions for either Praetorian case (only one of the two cases has a downloadable  manual) doesn't cover the wiring of the power/reset switches, and the LED indicator lights.  What it does cover are the front USB, Firewire, and Audio.  No problem with those, just the power related stuff.  I just don't want to F-things up just because I didn't ask.   I have also emailed Cooler Master about this but haven't heard anything back from them.  Thanks for the help.

Maybe you are looking for