Questioning the advice "don't use java.util.Enumeration".

http://NA.BlackBerry.com/eng/deliverables/5827/Avoiding_javautilEnumeration_447043_11.jsp

This recommendation encourages away us using vectors/hash tables?

If not, how did you wouldn't be throught a vector?

Kind regards

G

Not sure what speed is for vector.elementAt () but normally I tried to convert

vectors to the berries when their sizes are known. Once hashes happen is when you need

quick access and can tolerate some lost memory. I don't know if there are tips for

enumerate the entries but if you need to check each of them, then it will take time...

I've only used enumeration with the

debugging and some household code but if you determine that you need to list

much you should consider a different approach. If you have static data, THAT RIM offers

some matrix of the sorting facilities to allow you to do everything in a table and the same index so for research.

BTW, anyone know about caching memory on the loss of locality of phones-not much hurt RIM?

I gave up dealing in java in most cases, since I can't control the memory, but it is mentioned here.

http://en.Wikipedia.org/wiki/Hash_table

I guess I didn't have much on the generation of worried hash keys because I hope that it is implemented natively

code, but compared to a native binary search that you worry.

I guess if you need list and think that you need a hash table, consider a such linked list

that each table entry has a pointer to some prior element and according to as, then no matter what section gives you a

Automatic enumeration.

Tags: BlackBerry Developers

Similar Questions

  • Download the client computer name using java or javascript

    Hi guru,.

    ... JDev 11.1.2.4.0...

    I don't have any application in the ADF and I want to get the client computer name using java or javascript. I searched on this, but I have found that this javascript method

    function getWorkstationID() {var ax = new ActiveXObject ("WScript.Network"); alert (ax.ComputerName); }

    but that use ActiveX that only work in IE with some security configurations, and I want to get the computer name of any browser client.

    Can you please help me to get the client computer name?

    Try one of these 2 ways:

          HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
          String computerName = request.getRemoteHost();
    

    or

          HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
          InetAddress i = InetAddress.getByName(request.getRemoteAddr());
          String computerName =  i.getHostName();
    
  • Content transfer to the old drive again using disk utility?

    I just bought a new SSD and want to transfer all my HD content in a Mac Mini to it.

    The SSD vendor has advised using disk utility for drag-and - drop the old drive to the new, but until now I

    wasted summer. I formatted the new drive and resized the partition on the old drive to

    It is smaller than the new. When I try to run the utility, it seems to initialize and start the transfer, with

    at 2 p.m., provided the time to complete the process. However when I get back later nothing seems

    have been carried out.

    Anyone have any suggestions?

    No drag & drop won't do. Do this instead...

    12.x disk utility: create a disk image

    Also, you could use Time Machine, or software of cloning asSuperDuper! or Double Cloner

  • Create the new virtual machine using Java API vCloud

    Hi guys,.

    I am trying to create the new virtual machine in TIME, but I've stuck here. The API I'm using is vcloud-java-sdk - 1.0.jar.

    Could you please show me a code snippet how to do this?

    For now I do it like this:

    RecomposeVAppParamsType recomposeVAppParamsType = new RecomposeVAppParamsType();

    List the items < CompositionItemParamType > = recomposeVAppParamsType.getItem ();
    ReferenceType vappTemplateVMRef = new ReferenceType();

    // ??? seems that new reference to the new virtual machine should be here. But how to create this VM
    CompositionItemParamType compositionItemParamType = new CompositionItemParamType();
    compositionItemParamType.setSource (vappTemplateVMRef);

    Items.Add (compositionItemParamType);
    ReferenceType vAppRef is Vdc.getVdcByReference (vcloudClient, vdcRef) .getVappRefByName ("vApp_Websrv");.

    Vapp.getVappByReference (vcloudClient, vAppRef) .recomposeVapp (recomposeVAppParamsType);

    One day before I played with Web Services SDK, which is much easier to understand. I was able to create the vApp and VMs in vSphere. Is it possible to import machines virtual vSphere to vCloud? Should what API I use for this?

    Thank you

    Hello

    You cannot add a new empty virtual machine in a paralytic.

    Instead, you can add a virtual machine from an existing vapp, vapptemplate.

    To import a vsphere vm to vcloud.

    Import vsphere vm as VAPP in vcloud. VMWVimserver-> importVmAsVApp()

    The importation of vsphere vm, as vAppTemplate, in vcloud. VMWVimserver-> importVmAsVAppTemplate()

    See also the example of ImportVmAsvAppTemplate.java, which is part of the vcloudjavasdk group.

    Kind regards

    Rajesh Kamal.

  • Error downloading the file of cod using java loader

    While trying to download the cod to the device file using javaloader, what follows is the result of the command prompt:

    Charger Pocket RIM Wireless Java
    Copyright 2001 - 2008 Research In Motion Limited
    Connection to the device... debug: error HRESULT during Open: 80040154
    Error: could not open port
    Press a key to continue...

    The batch file reads:

    OFF @ECHO
    : RUN
    @ "C:\Program Research In Motion\BlackBerry JDE 4.7.0\bin\javaloader" usb - charge appName.cod

    BREAK
    OUTPUT

    Pointers to solve this problem?

    Thanks in advance.

    It's an XP operating system.

    The device has been appearing as BlackBerry 9530 in workstation.

    The problem solved after reinstalling device drivers using the CD that came with the device.

  • connection to the oracle application express using java and jdbc

    Hello!

    I am trying to build a java application using jbcd to connect to my Oracle Application Express DB but unable to connect actually using the following syntax:

    Private final static String DB = "myworkspacename";

    Private final static String RUTA public = "@apex.oracle.com:1521";

    private public static final String URL = "jdbc: Slim:" + RUTA + "/" + DB;

    private static final String DRIVER = "oracle.jdbc.OracleDriver";

    a USER private final static string = " " [email protected] "; "

    private final static String PASS = "MonMotpasse";

    and then I start the connection via:

    CONEX = DriverManager.getConnection(URL,USER,PASS);

    but finally I get the following error:

    IO error: the network adapter could not establish the connection

    any ideas on what goes wrong will be appreciated...

    Simple answer... YOU can't connect externally to the hosted instance of Oracle with a jdbc connection or sql developer/Toad.  Not allowed...

    If you need this capability, I would suggest downloading of Oracle 11 g XE and building you own database...

    Thank you

    Tony Miller
    Software LuvMuffin
    Ruckersville, WILL

  • How to find the Id of component using java script

    Hi all.

    I use Jdev 11.1.6

    I need get the id of the component in javascript code?

    I used this but its coming null

    var exportCmd = AdfPage.PAGE.findComponentByAbsoluteId ('HiddenBtn');

    Alert ("exportCmd" + exportCmd);

    < af:commandButton text = "commandButton 1 ' id = 'HiddenBtn '.

    clientComponent = "true" visible = "false".

    partialSubmit = "false" >

    < af:fileDownloadActionListener filename = "DetailedInventoryReport.xls"

    contentType = "application / vnd.ms - excel;" chatset = UTF-8 ".

    Method="#{pageFlowScope.sfdcInventoryManagedBean.detailedInventoryReportExport}"/ >

    < / af:commandButton >

    < af:resource type = "javascript" >

    function customHandler (actionEvent) {}

    var exportCmd = AdfPage.PAGE.findComponentByAbsoluteId ('HiddenBtn');

    Alert ("exportCmd" + exportCmd);

    }

    Please help me

    AdfPage.PAGE.findComponentByAbsoluteId ('HiddenBtn');  will not work in all cases (for example, in the area)

    Instead, you can link your button to the bean and retrieve id with something like: yourButton.getClientId () (after that, you can pass this javascript function id)

    Or you can try the ActionEvent queue directly on your button like this: Awasthi (Jdev/ADF) Ashish Blog: call to Action button by programming, Queuing ActionEvent

    Another approach to successfully recover clientId: https://blogs.oracle.com/groundside/entry/pattern_for_obtaining_adf_component

    Dario

  • Insert the VO data by using java code on OFA?

    Hi all,

    I m trying a way to insert data by a VO using the Row.setAttribute () function, I need pair this way, but with not much success, for now, I created the following code in the

    Application module:

    ' public void createRecord (String responsabilidad, String segment, String subsegmento) {}

    OAViewObject vo = this.getMovQuiebresComercialesVO1 ();

    If (! vo.isPreparedForExecution ()) {}

    vo.executeQuery ();

    }

    Line studrow = vo.createRow ();

    studrow.setAttribute ("ResponsibilityName", responsibility);

    studrow.setAttribute ("DescSegmento", segment);

    studrow.setAttribute ("DescSubsegmento", subsegmento);

    vo.insertRow (studrow);

    vo.setCurrentRow (studrow);

    vo.insertRow (studrow);

    vo.setCurrentRow (studrow);

    studrow.setNewRowState (Row.STATUS_INITIALIZED);

    }

    After that, I made a call to the apply method in the AM:

    {} public void apply()

    getTransaction () .commit ();

    }

    The VO has the following attributes: http://screencast.com/t/hJiNoyY8

    But I have not ben able to store the data in the Database, I would appreciate any suggestion

    Thank you all

    The solution was to initialize the VO in the page load Apps - OA Framework controller ViewObject for Table screen

  • Problem in the evaluation of the XPath in xml using java.

    Hello

    I wrote a method to evaluate the xpath expression and returns the result in the string 'true' or 'false' or 'anyValue as in the xpath expression.

    for example:

    < k >
    < g > 1 / < g >
    < c >! / < c >
    < /k >
    < k >
    < g > 2 / < g >
    < c > # </c >
    < /k >

    < k >
    $ < c >/< c >
    < /k >

    If the xpath expression is /k [g / text () = '1'] / c/text () = "#"-the code returns false

    Similarly /k [g / text () = '1'] / c/text () ='! ' - returns true

    But in the flow of my project, we have removed the xml node that contains no data. Thus, the last < k > tag is not have < g >. then, East - wat I think

    If the xpath expression is /k [g / text () = "] / c / text () = ' $' should return true. but since there is no < g > tag, it returns false. But, by the logic of my project, g is there, but the bcz removed its null...

    Pls help me with this...

    Thank you
    Sabarisri. N

    Edited by: Sabarisri N November 11, 2011 16:33

    Edited by: Sabarisri N November 11, 2011 16:35

    The criteria for the return of true or false is not clear as the three bodies that are specific. To take account of these three cases, the xpath expression can be very restrictive in look like that. By way of illustration, I put it in a knot xsl or xsl: When, use tests, assuming the context node to be the parent of the node k.

    
    

    Because the conditions are specific, it seems inevitably awkward due to the need of the enumeration of the case-by-case basis.

  • How to get Messages and the iPhone DON'T use numbers of cells no

    Messages and my iPhone to display all numbers I have in contacts of the person. Since the Messages or the iPhone screen, identify which number is which, is possible to have these devices do not show the number of cells not? Without search numbers, the only indicator that I know is that the on-screen list displays in the order they are typed in Contacts. Usually a mobile number or iPhone is first of all, but not always.

    When I type a name in the phone or take messages, it includes the label for the number. Make sure you have correctly marked numbers in the contacts entry.

  • Where are the java.util.logging properties?

    Hello

    We have a java code that is called from PL/SQL. The Java code uses java.util.logging to connect diagnostic and error messages.

    Where are the papers?

    Where we can configure logging properties?

    DB is Oracle 11 g.

    Documentation (Guide of the Java developer, 11 g Release 2 (11.2), E10588-04) says nothing about the record.

    Thank you...

    Roger

    Hi, Roger:
    The recorded information come to the .trc file for the Oracle (shared or dedicated) server process.
    .trc files are the Oracle Diagnostics directory, for example:
    $ORACLE_BASE/diag/rdbms / $ORACLE_SID / $ORACLE_SID/trace
    To configure log file properties read this blog entry:
    http://marceloochoa.blogspot.com/2007/11/getting-logging-entering-exiting-and.html
    Best regards, Marcelo.

  • Disable debugging messages she draws thirdparty java.util.logging service

    I use java.util.logging api for logging. It works very well. Now I have a third-party library that uses the someother registration service. When I run my application, I see this library third party out tons of debug log messages. How can control which helps Java util without the configuration of the service. Please let me know. I use the Java8 version.

    Thank you.

    You can I want java.util.logging to a third party not related to the logging control framework? It is not possible.

  • automate the smartlist using contour utility questions

    Hello

    IAM want to automate the smartlist using .csv for Member of the entity dimension using contour utility

    Create a smart list called "alnasser' member of the dimension entity E10134

    alnesser smarlist contains a) price b) sale c) prefixing sale d) d afterpricing) test factor has two child

    IAM not not see members of the smart list under alnasser

    file source as follows below

    Entity, Parent, Data Storage, Description, Data Type, Base, Plan Type (Plan1), aggregation (Plan1), Smart List ALNASSER currency
    E10134, store, ALNASSER, unspecified, USD, 1, +, ALNASSER, sales

    his show a column name or header not recognized

    How to give the source smart list with the entity dimension and where I did the source of error and give to testfactor

    I guess that the error with the header name alnasser smartlist

    Sreekumar.H

    Hello

    Could you just add the values for the smart list in the planning, once they are in place, you don't have to set them up again.
    If you can't then I would use something like LCM to create an XML with values inside and then import it into.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Cannot convert abcd of the type class java.lang.String interface java.util.List

    Hello

    I get an error of "cannot convert the class type abcd java.lang.String interface java.util.List" where "abcd" is a string in a listbox.

    and my code is something like this

    < af:selectOneListbox id = "lstcatg" label = 'List of categories' partialTriggers = 'proud '.

    value = "#{viewScope.RegWoComp.lstboxcatg}" >

    < f: selectItems id = value="#{viewScope.RegWoComp.customList}"/ "lstselect1" >

    < / af:selectOneListbox >


    bean

    private list < String > lstboxcatg;

    {} public void setLstboxcatg (List < String > lstboxcatg)

    This.lstboxcatg = lstboxcatg;

    }

    public List < String > getLstboxcatg() {}

    Return lstboxcatg;

    }

    public BindingContainer {} getBindings()

    Return BindingContext.getCurrent () .getCurrentBindingsEntry ();

    }

    Private Sub button (ActionEvent actionEvent)
    {
    JUCtrlListBinding listBindings = (JUCtrlListBinding) getBindings () .get (lstboxcatg);
    Object [] str = listBindings.getSelectedValues ();

    for (int i = 0; i < str.length; i ++)

    {

    System.out.println (STR [i]);

    }
    }

    I tried to use this fact.

    object str = listBindings.getSelectedValue ();

    System.out.println (STR);

    and here, if I change the data type of lstBoxcatg

    private String lstboxcatg;

    {} public void setLstboxcatg (String lstboxcatg)

    This.lstboxcatg = lstboxcatg;

    }

    public String getLstboxcatg() {}

    Return lstboxcatg;

    }

    can I get a nullpointerexception on line object str = listBindings.getSelectedValue ();

    No you can use this code you don't use link layer

    remove this code. You will get the selected value in this string variable

    Just write this about you button action and verification.

    System.out.println (selectedVal);

    Ashish

  • Export the whole (10 GB) using Data Pump utility export base

    Hello

    I have a requirement that we have to export all of the base (10 GB) using Data Pump export utility because it is not possible to send the discharge of 10 GB in a CD/DVD for the seller of our application system (to analyze a few problems that we have).

    Now when I checked online full export is available but not able to understand how it works, as we never used this data pump utility, we use the method of normal export. In addition, the data pump will reduce the size of the dump file so it can fit on a DVD or can we use utility export parallel DB full to split the files and include them in a DVD, it is possible.

    Please correct me if I am wrong and kindly help.

    Thank you for your help in advance.

    Pravin,

    The server saves files in the directory object that you specify on the command line. So what you want to do is:

    1. from your operating system, find an existing directory or create a new directory. In case you, C:/Dump is as good a place as any.

    2. connect to sqlplus and create the directory object. Just use the path. I use linux, so my directory looks like/scratch/xxx/yyy
    If you use Windows, the path to your directory would look like C:/Dump you should not attack.

    3. don't forget to grant access to this directory. You can grant access to a single user, group of users, or the public. Just like
    any other object.

    If it helps, or if she has answered your question, please mark messages with the appropriate tag.

    Thank you

    Dean

Maybe you are looking for