Table of files - last item replaces all others - SEO problem

I use the following structure: Applet-> MasterFile-> DirectoryFile-> file

now simply file consists of:

public class File {
  private byte[] aid;

  public File (byte aid[]) {
       this.aid = new byte[(short) 6];
       Util.arrayCopy(aid, (short) 0, this.aid, (short) 0, (short) 6); 
  }

public byte[] getAID() {
  return aid;
  }
}

DirectoryFile for the moment only this:

public DirectoryFile(byte[] aid) {
  super(aid);
 }

now in the main folder, I have a class addDF to add a new DirectoryFile to a predefined DirectoryFile table (I omit the constructor is easier to read):

byte numApp; // number of applications
 DirectoryFile[] arrayDF = new DirectoryFile[8];// 8 possible applications

// constructor

public byte addDF(byte[] aid) { 
     numApp++;
     arrayDF[numApp] = new DirectoryFile(aid);
     
      return numApp;
  }

and in the real applet I add a DirectoryFile for the main folder as follows:

MasterFile master;   
      
numApp = adfptse.addDF(aid);

apdu.setOutgoing();
apdu.setOutgoingLength((short) 24);
for (byte i = 2; i <= numApp; i++)
      apdu.sendBytesLong(master.arrayDF[numApp].getAID(), (short) 0, (short)

For the moment, I just want to print all aid recorded so far in the table.

For the first call with for example. AID = A10101010101 it simply responses to AID

Now when I call later with AID = B20202020202 it answers with B20202020202 B20202020202... so I guess I'm only referring to a place and by adding a new AID, I also changed the referenced.

Since I can't clone an array in java card I don't know what else to do to make this work!

Hello

It looks like a problem with indexing in a loop.

I think in the next line,

"apdu.sendBytesLong (master.arrayDF [numApp] .getAID ()...". "it should be 'I' instead of 'numApp' and 'i' should start from"0"loop.

If it's not wrk giv SMEs more details of the code if it can be shared.

ARO

PPT

Tags: Java

Similar Questions

  • How to make a Flash swf file. start only after all other elements are on the DW page?

    Sorry if I'm posting in the wrong forum. I didn't know if I should be here or in the forum of Dreamweaver. Just trying to figure out how to make a Flash swf file. start only after all other elements on the page have been downloaded. Is that what you would do in Flash through publication settings, or this would be finished in Dreamweaver?

    You are welcome.  I just checked and there is an onLoad parameter you can use in the BODY tag to ignite a javascript function.  I hope that's what this implies, that it is.

  • How to copy a folder to an external hard drive with the same file on it and have it just add new files instead of replace all old already on there, as well as to add new?

    I want to copy a folder to an external hard drive with the file already on it and not having to replace all the files each time. I just want to click and drag the folder to the external hard drive and have it add new files I've added in the folder on my pc over time on the external hard drive. It's annoying to have to replace alllll the files each time.

    Thank you!

    A simple way is to use the second copy of Centered.com software. It is reasonably priced and will do exactly what you want. MS - MVP - Elephant Boy computers - don't panic!

  • Find/replace all other cases

    I have a lot of numbers that I copied from Excel - they are separated by tabs, and returns, and I want to turn them into a table.

    My problem: I want to replace any other tab character and automate this process if possible.

    example - I want that:

    1.02 25.9 [TAB] [TAB] [TAB] 0.61 15.5 [TAB] 0.90 [TAB] 22.9

    1.08 [TAB] [TAB] 27.4 0.64 16.3 [TAB] [TAB] 0.92 [TAB] 23.4

    (where [TAB] is actually a tab character)

    to look like this:

    1.02 (25.9) 0.61 (15.5) [TAB] [TAB] 0.90 (22.9)

    1.08 (27.4) 0.64 (16.3) [TAB] [TAB] 0.92 (23.4)

    Is it possible to use find/replace to replace each other tab with a "("?) "

    Thanks in advance,

    Mike

    mikeborgsdorf wrote:

    Is it possible to use find/replace to replace each other tab with a "("?) "

    Sure! GREP mode, search

    (\d+\.\d+)\t(\d+\.\d+)

    and replace with
    $1 ($2)
  • InDesign script for a text of color replace all other lines in a text box

    I have a very long list of names I need to alternate the color CMYK, all other rows value.

    I found this script on another thread to adobe changing the hue of every 3rd line:

    var i, p; for (i=0; i<app.selection[0].paragraphs.length; i++) { p = app.selection[0].lines[i]; if (i%3 === 2) { p.fillTint = 50; } } 

    I tried to change the script to change the value of CMYK, do this:

    var i, p; for (i=0; i<app.selection[0].paragraphs.length; i++) { p = app.selection[0].lines[i]; if (i%2 === 1) { p.colorValue=[0,100,100,0]; } } 

    But using 'colorValue' is not supported. How can I change the script to do all the other lines in a text box to change the value of the color?

    var i, p, color;
    for (i=0; i		   
  • dominant touch event handler replaces all other fields

    I have the code following, which uses gestures to perform scrolling on my hfm, but substitution of this hfm, replace essentially all fields on the screen, making them useless. How is this possible, I thought that this specific touchEvent belonged to the hfm? How to work around this problem and just disable scroll for the hfm?

    gallery = new CustomHFM(){
    
                protected void sublayout(int maxWidth, int maxHeight){
                    super.sublayout(maxWidth, 200);
                    setExtent(maxWidth,200);
                }
    
                protected boolean touchEvent(TouchEvent message){
    
                    int eventCode = message.getEvent();
    
                    if(eventCode == TouchEvent.GESTURE){
                        System.out.println("SWIPE GESTURE");
                        TouchGesture g = message.getGesture();
                        int gesturecode = g.getEvent();
                        int direction = g.getSwipeDirection();
    
                            //gallery.setHorizontalScroll(page_two, true);
                        if(direction == TouchGesture.SWIPE_WEST)
                            slideNext();
    
                        if(direction == TouchGesture.SWIPE_EAST)
                            slidePrev();
    
                        pressed = true;
                    }
    
                    if(eventCode == TouchEvent.UP){
                    pressed = false;
    
                    //slide();
                    }
    
                    return true;
                }
            };
    

    I want to just do not use the default scroll and do my own thing! Any suggestion would be appreciated, I'm really in the fire right now.

    OK, this is a different problem.  I suspect that you must reject touch events that are not actually within your HFM.  Then add code like the following at the beginning of your touchEvent method:

    int x = message.getX (1);
    int y = message.getY (1);
    If (x < 0="" ||="" y=""> < 0="" ||="" x=""> getExtent () .width: y > getExtent () .height) {}
    Outside the scope
    Returns false;
    }

    If this is not enough, so be sure that your touchEvent method is called.  If it really is, then I think you have a problem with a Manager.  You have all Directors complicated on your screen.  Try to simplify the screen so that you don't use native components RIM (and nothing implying positioning as AbsoluteFieldmanager and see if the problem persists.)  If so, then see if you can post an example of the sample that shows the problem so that we can all try.

  • keyDown replaces all other keys

    I want to capture some pressure on keys, so I can use the keypad as a "controller" of sort... but I want that all the other buttons to act as usual.

    How would I go to do this?

        //this manager is used for the static background image
            mainManager = new VerticalFieldManager( NO_HORIZONTAL_SCROLL | NO_VERTICAL_SCROLL  )
            {               
    
                protected boolean keyDown(int keycode, int time)
                {
                try
                    {
                if (keycode == 5701632 || keycode == 5701666 || keycode == 5701633)
                {
                }
                else if  (keycode == 4521984 || keycode == 4521985 || keycode == 4522018)
                {
                }
                else if  (keycode == 5373952 || keycode == 5373953 || keycode == 5373986)
                {
                }
                else if  (keycode == 5439488 || keycode == 5439489 || keycode == 5439522)
                {
                }
                else if  (keycode == 4456448 || keycode == 445644 || keycode == 4456484)
                {
                }
                else if  (keycode == 4587520 || keycode == 4587521 || keycode == 4587554)
                {
                }
                else if  (keycode == 5898240 || keycode == 5898241 || keycode == 5898274)
                {
                }
                else if  (keycode == 5767168 || keycode == 5767169 || keycode == 5767202)
                {
                }
                // blackberry button
                else if  (keycode == 268566528)
                {
                }
                // red button
                else if  (keycode == 1179648)
                {
                }
                // back button
                else if  (keycode == 1769472)
                {
                }
                    }
                    catch (MediaException e)
                    {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }   
    
                    return true;
                }
    
                protected boolean keyUp(int keycode, int time)
                {   
    
                    return true;
                }
    
            };
    

    Or do I actually code for all the other buttons?

    Hi footose,

    You must return false, if the key was not consumed by your method, in order to tell the system that the key should be covered in more detail. Means, in your structure, you should return true if the key was one you expected and treats you to false otherwise.

    You may want to consider implementing your if structure like a switch-case structure. Is better to read afterwards for maintenance.

    Kind regards

    Carsten

  • Telephone number Facebook replaces all other contact phone numbers

    The title pretty much everything said.

    I have a facebook contact who has added their phone number to facebook. This phone number is only available when you view the contact through the contact application and when typing his name in the phone app. Because the number is wrong, I can't call!

    I tried to add additional numbers, nothing helps...

    Help! How can I change the default phone number?

    Just made a discovery: apparently, the algorithm used by webOS to detect the same GSM number is simplistic.

    I added a leader + on the phone gmail is hidden the number and all of a sudden, the phone number of gmail has resumed and the number of facebook.

    This solved my problem, but the behavior of webOS is still very strange. I expect to be able to choose among all the available numbers for a contact.

  • AE is striking a non-imported file and play all other images

    Ive been working on a computer of illustrator in AE CS3 without any problems until I increased the duration of past image projects. I interpreted the images in a loop so I could animate with it, to see that EI plays a file that I never once imported, all other images. Its those colorful bars of tv with a black sign in the top left with the name of a pdf file that was sitting in the same folder as my computer. Not only that, but its extremely slow play.

    I deleted the offending PDF, created a new project and introduced the original model of illustrator to see if he would still appear and his party, but now I have no way I find my project and no idea if it will happen again.

    Looks like you may have imported the Illustrator document and the PDF as a sequence of images, rather than as individual images.  They have the sequential names?

    In your original (problematic) model, replace the original file with the Illustrator document, but ensure that the "Image Sequence" checkbox is unchecked in the import dialog box.

  • When you transfer large files of network, all other requests are not sent to the server

    In our application, we are facing a weird scenario where we try to download a huge file(600+ MB) of the network, all other requests (AJAX) are getting blocked. But when the same file is downloaded from the local location (drive E) so that everything works fine.

    How do you download the file via the network?

    If you want to solve the bandwidth? and the nets where a process takes previous on the other, you will have to troubleshoot the QoS of the network on what see you.

    To give a better visual, please, use Firebug or Web Developer tool, called network analysis applications. The "XMLHttpRequest" will give better clues for Ajax. Reference http://ajaxian.com/archives/ajax-debugging-with-firebug

    There may be a topic: configuration option that allows persistent connections per server, you can check mutithreading or max.

  • How can I fix a black and white screen on the air from my iPad? I rebooted it and ran the last updated IOS 9.2 on it. It is stuck and won't return to the color. All other functions work except this.

    How can I fix a black and white screen on the air from my iPad? I rebooted it and ran the last updated IOS 9.2 on it. It is stuck and won't return to the color. All other functions work except this.

    Have you checked the settings > General > accessibility > greyscale > power off.

    If this does not work ty settings > General > accessibility > zoom > on. Triple, tap the screen with three fingers. Tap choose filter. Click None. Triple, tap the screen to get rid of the menu zoom. If you have enabled greyscale in zoom you can disable it in zoom.

  • Why my PC does not install updates? Although located to automatically receive my last update was February 2015 and all others have failed.

    Original title: updates

    Why my PC does not install updates? Although located to automatically receive my last update was February 2015 and all others have failed.  Although I tried to reset nothing help.

    Have also tried to download Windows 10 but computer spends all day looking for updates, but nothing happens.

    As its been almost a year that it is updated, you may be better off to backup your data and backup of your entire system, so you can get back to this point at least if something goes wrong. Then:

    Update your anti-virus software and run a full scan. Then download, install, update and run a full scan with Malwarebytesfree. Keep it free, no need to start a trial etc. Malware can be a cause of failure of the updates, the scan won't take long to run and should report something nasty, if its there.

    Then you can try the following:

    1 convenience store update Windows - http://windows.microsoft.com/en-US/windows7/Open-the-Windows-Update-troubleshooter

    2 system update readiness tool - http://windows.microsoft.com/en-us/windows7/what-is-the-system-update-readiness-tool

    3 components of reset update - https://support.microsoft.com/en-us/kb/971058

    4. check that "Windows update service" and "Background Intelligent Transfer Service" are listed and running according to the details in this article - https://support.microsoft.com/en-us/kb/2730071 "

    If the above does not help, consider trying a 'repair installation system' - http://www.sevenforums.com/tutorials/3413-repair-install.html if you have windows installation discs, or a 'factory reset' (updated) If your PC came with no windows disk and was preinstalled. NOTE - in case backup your data and your system first in the form of data may be lost if something goes wrong, and data will be lost in the case of a factory reset.

    If you do not want to reinstall again, post back with more details, that is at least what is the error code when the updates fail? (find an update failed in "view history update", right click and click details.) Check a bit to see if the same error code. ). Then someone else can we hope to help more.

  • I have two computers in Windows 7 which will not each other on my network. All other computers will see and can share files, but they connect between them.

    My HP laptop has installed Win7 Ult, the Fujitus Win7 Pro.

    Both computers were sharing the files back, outside a residential group, for a period of time. One day, they are stopped. No changes have been made to computers. I tried a restore of the system on each of them, and it did not help. I re windows loaded on the HP and that did not help. I don't think that it is only a permission of the questions that I used a windows machine 7 third to map actions to each of the individual laptops using their respective IDs. I can transfer files from one of them the "machine in the middle", then the action of the other, or as a copy/paste between them directly.

    WSD and NetBT will not solve one machine for others, but all other computers on the network will dispay on each machine. Only, they refuse to see each other. I have disabled the firewall. Password protected sharing, ensured that all netbios in the registry settings are correct. Pings between them are inaccessible returnded.

    Any help would be appreciated.

    Thank you!

    Hi Jonathan,.

    I see that you two computers on the network cannot see each other. I'll help you with this problem.

    1. don't you make changes to the computers?

    2 are computers on a domain network?

    3. do you have a router connected to these computers?

    Method 1:

    Open the HomeGroup troubleshooter

    http://Windows.Microsoft.com/en-us/Windows7/open-the-HomeGroup-Troubleshooter

    Method 2.

    Make sure that the following services are enabled on the computer.

    (a) click Start, type "services.msc" in the search and click on services. Verify that these services are enabled:

    -TCP/IP NetBIOS Helper service

    -DNS Client

    -Function Discovery Resource Publication

    -SSDP Discovery

    -UPnP device host

    To start the service and set it to automatic, follow these steps:

    (b) right click on each of the services listed above and click Properties.

    (c) click the general tab, and then, next to startup type, select automatic.

    (d) click on apply and then click Start.

    Method 3.

    I suggest you follow the steps in this article.

    Enable or disable network discovery: http://windows.microsoft.com/en-US/windows7/Enable-or-disable-network-discovery

    Method 4:

    Why can't I connect to other computers?

    http://Windows.Microsoft.com/en-us/Windows7/why-can-t-I-connect-to-other-computers

    Refer.

    Homegroup:

    http://Windows.Microsoft.com/en-CA/Windows7/products/features/HomeGroup

    Let us know if you need assistance with any windows problem. We will be happy to help you.

  • To combine files to PDF, a file has been replaced by another, the program automatically replaces the files? in other words, I did not choose, and it was merged into the document.

    When you combine files to PDF a single file has been replaced by another, can the program automatically replace files? in other words, I has not been chosen, and it has been merged in the document.

    Sorry, I don't have any ideas. This isn't a usual problem. It may be useful to repeat carefully to see if it happens again and check that the files contain what you expect.

  • When you modify a form in the DC or Pro Player I can enter text etc., save, close, and return later to change it. However, once I use the function "Fill &amp; Sign" and save the document, it locks the file and all other fields are not editable. Is there a

    Hi guys,.

    When you type information in a form in the DC or Pro Player I can enter text with fields of text etc and then save, close and return later to change the form. However once I use the function "Fill & Sign" to sign the document, and then save, it locks the file and all other fields become editable. Is there a way around this to remove this feature where it becomes locked and instead allows me to change the form after a signature is applied and saved. All the security properties of the form are on 'admitted', there is no restriction. Even though the document is locked all the properties remain still as 'authorized '.

    The signing is FINAL.  You cannot sign a PDF paper advance. Complete and save, do not sign.

Maybe you are looking for

  • Repeat me an adobe flash plugin broke down I tried to fix it but can u help me please

    He repeats to me adobe flash plugin crashed I tried ti fix but can't u can help me please This has happened Each time Firefox opened

  • Satellite P500 PSPGSE - Start Power button problem

    Hello! Hi, I have a problem with my laptop! Power-start button on my usual (pspgse drivers) Toshiba p500 works, but when I use remote control work.A month AGO portable is in SERVICE of TOSHIBA in Serbia and they say that this is a problem in the bios

  • Phone storage running Low?

    Hi all. I've had my Droid for a little over a month or two (just upgraded the LG Voyager) and, of course, been download applications on the market. Even though I have the 16 gig SD card, with 11 open, he says 'Phone storage Low' or something like tha

  • Using the Web Service

    I use the Version of Eclipse: 3.4.1 with BlackBerry JDE component Pack Version: 4.6.1.27. I intend to use an existing .net web service. I'm not aware of the process to use it in the BlackBerry environment. Kindly help. Relevant sorce codes would be e

  • Kaspersky metro Style

    Where can I download kaspersky style metro app? When I install KIS 2013 he says now, you can free download KIS in metro style and when I click on install metro style need me to store windows 8, but there is no such app.