Writing the toArray method

This is a question from a quiz of mine from a course from last semester. I am trying to work it to help prepare for an exam.
I am to write the toArray method to add the elements of a list to an array of the exact same size. I am to do this using an iterator.
Here is what I had done. This is suppose to be in a "driver" class.
ListInterface list = new List??Based(); //The type of implementation shouldn't matter
Object[] = toArray(list)
private static Object[] toArray(ListInterface list)
     Iterator iter = list.iterator();
     int size = 0;
     while(iter.hasNext())
          size++;
          iter.next();
     int index = 0;
     Object[] temp = new Object[list.size()];
     while(iter.hasNext())
           array[index] = item.next();
           index++;
}I am open to any constructive criticism. This is as far as I have gotten.

Here is my final code for the proposed problem:
ListInterface list = new List??Based();
Object [] array = toArray(list);
*Returns an Object array containing the exact elements of a given list. <br>
*Preconditions: A list of elements to insert into an array. <br>
*Postconditions: An array of the elements from the given list. The list will not reference the array, therefore the array
* is an independent copy of the elements from the given list. <br>
*Throws: none <br>
private static Object[] toArray(ListInterface list)
     Iterator iter = list.iterator(); //to traverse the list
     Object tempArray = new Object[list.size()]; //creates a new array of the exact same size of the list
     while(iter.hasNext()) //test to make sure we have not reached the end of the list
          int index = 0; //the starting index of the array to add elements
          array[index] = iter.next(); //gets the item and places into the array
          index++; //increments index by 1 to move to next place of insertion in the array
     }// end while
     return tempArray; //returns the new array to the calling method
}// end toArray    

Similar Messages

  • What is the best method for writing Multicolum​n List data to a text file?

    I am trying to find the best method for writing the data from a multicolumn list to a text file. Say the list has 7 rows and 6 columns of data. I would like the final file to have the data resemble the Multicolumn List as closely as possible with or without column headers. A sample VI showing how to accomplish this would be greatly appreciated. I realize this is pretty basic stuff, but I can get the output to the file, but it comes out with duplicate data and I am on a time crunch hense my request for help.
    Thank You,
    Charlie
    Everything is Free! Until you have to pay for it.

    Hello,
    I think that the answer to your question it's on the example that I've made right now.
    See the attached files....
    Software developer
    www.mcm-electronics.com
    PS: Don't forget to rate a good anwser ; )
    Currently using Labview 2011
    PORTUGAL
    Attachments:
    Multi.vi ‏12 KB
    Multi.PNG ‏6 KB

  • Trying to understand the getResource method

    Hi!
    I'm writing a simple game and I'm using a game framework for java. The framework uses the getResource("path") method on creating every texture. The constructor only accepts the relative path. My problem is I don't want image files to be placed in the build folder. I would like to create textures from an absolute path. I don't want to modify the framework code.
    In the Class Loader javadoc I've found that getResorce method executes the findResorce method if it fails on finding the resource. The findResource method should be overriden in a Class Loader implementation. How can I do it?
    Thanks.

    morgalr wrote:
    tom_ex wrote:
    Hi!
    I'm writing a simple game and I'm using a game framework for java. The framework uses the getResource("path") method on creating every texture. The constructor only accepts the relative path. My problem is I don't want image files to be placed in the build folder. I would like to create textures from an absolute path. I don't want to modify the framework code.
    In the Class Loader javadoc I've found that getResorce method executes the findResorce method if it fails on finding the resource. The findResource method should be overriden in a Class Loader implementation. How can I do it?
    Thanks.It does this so you can JAR your application, which gives you the ability to distribute an executable with all of your resources included. So your buds will not have to worry about if they have the support files installed to run your application or not.I understand the intention, but it's rather an opposite of what I'm trying to do. In my idea the game on it's first running aks the user for a path. The path points a place where the sounds and images should by downloaded i.e. from an ftp server. On the later runnings the game already know where the images, etc have been downloaded and uses them.

  • How and when the realDelete method gets called for a custom adapter?

    Hi,
    I am a newbie in sun identity manager and is in the process of writing a custom adapter for documentum resource.
    While I am successful in creating the resource,then provisioning the resource to an user(i.e creating an account of the user on documentum ) updating the user through idm I am not being able to deprovision the resource.
    Actually in the trace I am not seeing the realDelete method getting called anywhere,but I am sure if it gets called it would do its designated job bcos as a standalone code it's working.
    Does this mean I am not properly doing deprovisioning in sun-idm?
    What method I am employing is in the assignment list of the user,i am putting the resource from assigned to unassigned side(i.e right to left side) just as in case of provisioning I have put it from left to right.
    Is it the standard way of deprovisioning or am I missing something here?
    Any sort of help would be highly appreciated.
    Thanks
    anjan

    You need to read that manual with more caution. It has all info you need.
    1. Table modification info stays in shared pool and flushed into dictionary by Oracle automatically. You can explicity do it by calling dbms_stats.flush_database_monitoring_info.
    2. dba_tab_modifications view = How many DML are applied to target table?
    dba_tab_statistics.stale_stats = Is statistics stale?
    3. When you call dbms_stats.gather... familiy, Oracle flushed the stale info to disk. You gnerally don't need to care about that.
    4. Statistics is considered to be stale, when the change is over 10% of current rows.
    (As of 11g, this value can be customized per objects. Cool feature)
    create table t_stat(id int);
    insert into t_stat select rownum from all_objects where rownum <= 100;
    commit;
    exec dbms_stats.gather_table_stats(user, 'T_STAT');
    select * from sys.dba_tab_modifications where table_name = 'T_STAT';
    No row selected
    select stale_stats from sys.dba_tab_statistics where table_name = 'T_STAT';
    NO
    insert into t_stat select rownum from all_objects where rownum <= 20;
    select * from sys.dba_tab_modifications where table_name = 'T_STAT';
    No rows selected <-- Oops
    select stale_stats from sys.dba_tab_statistics where table_name = 'T_STAT';
    NO  <-- Oops
    exec dbms_stats.flush_database_monitoring_info;
    select * from sys.dba_tab_modifications where table_name = 'T_STAT';
    TABLE_OWNER     TABLE_NAME     PARTITION_NAME     SUBPARTITION_NAME     INSERTS     UPDATES     DELETES     TIMESTAMP     TRUNCATED     DROP_SEGMENTS
    UKJA     T_STAT               20     0     0     2008-01-18 PM 11:30:19     NO     0
    select stale_stats from sys.dba_tab_statistics where table_name = 'T_STAT';
    YES

  • Getting an error as "Access denied" while writing the data into CRM 2013?

    Hi,
    I have written code in Script component Transformation to connect CRM 2013. I have used CRM 2013 SDK to connect it.
    #region
    Help:  Introduction to the Script Component
    /* The Script Component allows you to perform virtually any operation that can be accomplished in
    * a .Net application within the context of an Integration Services data flow.
    * Expand the other regions which have "Help" prefixes for examples of specific ways to use
    * Integration Services features within this script component. */
    #endregion
    #region
    Namespaces
    using
    System;
    using
    System.Data;
    using
    Microsoft.SqlServer.Dts.Pipeline.Wrapper;
    using
    Microsoft.SqlServer.Dts.Runtime.Wrapper;
    using
    Microsoft.Xrm.Sdk;
    using
    Microsoft.Xrm.Sdk.Query;
    using
    Microsoft.Xrm.Sdk.Client;
    using
    Microsoft.Xrm.Sdk.Messages;
    using
    System.ServiceModel;
    using
    System.ServiceModel.Description;
    #endregion
    [Microsoft.SqlServer.Dts.Pipeline.
    SSISScriptComponentEntryPointAttribute]
    public
    classScriptMain:
    UserComponent
    //This
    method is called once, before rows begin to be processed in the data flow.
    ///You
    can remove this method if you don't need to do anything here.
    IOrganizationServiceorganizationservice;   
    // Variables for the CRM webservice credentials
    // You could also declare them in the PreExecute
    // if you don't use it anywhere else
    stringCrmUrl =
    stringCrmDomainName =
    stringCrmUserName =
    stringCrmPassWord =
    publicoverridevoidPreExecute()
    base.PreExecute();
             * Add your code here
    CrmUrl =
    this.Variables.CrmWebservice.ToString();
            CrmDomainName =
    this.Variables.CrmDomainName.ToString();
            CrmUserName =
    this.Variables.CrmUserName.ToString();
            CrmPassWord =
    this.Variables.CrmPassWord.ToString();
    // Connect to webservice with credentials
    ClientCredentialscredentials =
    newClientCredentials();
            credentials.UserName.UserName =
    string.Format("{0}\\{1}",
    CrmDomainName, CrmUserName);//"[email protected]";
            credentials.UserName.Password = CrmPassWord;
            organizationservice =
    newOrganizationServiceProxy(newUri(CrmUrl),
    null, credentials,
    null);
    ///This
    method is called after all the rows have passed through this component.
    ///You
    can delete this method if you don't need to do anything here.
    //</summary>
    publicoverridevoidPostExecute()
    base.PostExecute();
             * Add your code here
    ///<summary>
    ///This
    method is called once for every row that passes through the component from Input0.
    //<param
    name="Row">The row that is currently passing through the component</param>
    publicoverridevoidInput0_ProcessInputRow(Input0BufferRow)
             * Add your code here
    EntityContact =
    newEntity("Contact");
       Contact["Employeeid"] = Row.EmpId;    
     if (!Row.Prefix_IsNull)
        Contact["MiddleName"] = Row.Prefix;
    organizationservice.Create(Contact);
    I was getting an error when the Create method is called from Organizationservice object and it is executing fine till that method. Could you please suggest me how to go further on this?
    Thanks &amp;amp; Regards, Anil

    Hi Anil, 
    You want to make sure you use lower case for both CRM entity and field names. 
    In any case, writing a custom script component to talk to CRM may not sound terribly hard, but as soon as you get more business requirements and you deal with more entities, you will find it is not something trivial.
    For this reason, we highly recommend you check out a commercial offering which will actually save you a lot of time and effort. Check out our solution at http://www.kingswaysoft.com/products/ssis-integration-toolkit-for-microsoft-dynamics-crm/ for
    further details, we offer many integration features for Microsoft Dynamics CRM you can't find elsewhere, such as Upsert, Text Lookup, many-to-many relationship support, various writing actions, etc. 
    Disclaimer: I work for KingswaySoft
    Daniel Cai | http://danielcai.blogspot.com |
    @danielcai | Data Integration made easy with
    SSIS Integration Toolkit

  • Soap fault, cannot find the dispatch method

    I deploy the HelloService example from "The Java EE 5 Tutorial
    For Sun Java System Application Server Platform Edition 9, chapter 1" to Sun Java System Application Server Platform Edition 9.0 Beta (build b32g), I tested it and it works find but when I invoked it from Servicemix-3.0 which use org.apache.servicemix.components.saaj.SaajBinding i got the following response:
    <?xml version="1.0" ?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://endpoint.helloservice/"><soapenv:Body><soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>soapenv:Client</faultcode><faultstring>Cannot find the dispatch method</faultstring></soapenv:Fault></soapenv:Body></soapenv:Envelope>
    Using the Monitor to look at the request message I could not see any significant difference, follows both requests:
    Test:
    <?xml version="1.0" ?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://endpoint.helloservice/"><soapenv:Body><ns1:sayHello><arg0>ffg</arg0></ns1:sayHello></soapenv:Body></soapenv:Envelope>
    servicemix:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><SOAP-ENV:Envelope xmlns:ns1="http://endpoint.helloservice/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <ns1:sayHello> <arg0>Leopoldo</arg0> </ns1:sayHello> </SOAP-ENV:Body> </SOAP-ENV:Envelope></SOAP-ENV:Body></SOAP-ENV:Envelope>
    The log entry detail asociate is:
    Message ID: Error in decoding SOAP Message Error in decoding SOAP Message at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java
    Complete Message
    86)     at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.toMessageInfo(SOAPMessageDispatcher.java:168)     at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher$SoapInvoker.invoke(SOAPMessageDispatcher.java:533)     at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:144)     at com.sun.xml.ws.server.Tie.handle(Tie.java:88)     at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:174)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:822)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)     at java.lang.reflect.Method.invoke(Method.java:585)     at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:262)     at java.security.AccessController.doPrivileged(Native Method)     at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)     at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:295)     at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:178)     at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:390)     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)     at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)     at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)     at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)     at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)     at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)     at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)     at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)     at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:223)     at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:664)     at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:571)     at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:846)     at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:345)     at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:237)     at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:240)     at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)Caused by: javax.xml.ws.soap.SOAPFaultException: Cannot find the dispatch method     at com.sun.xml.ws.encoding.soap.SOAPDecoder.raiseFault(SOAPDecoder.java:662)     at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.decodeDispatchMethod(SOAPXMLDecoder.java:151)     at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBodyContent(SOAPDecoder.java:335)     at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBody(SOAPDecoder.java:325)     at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeEnvelope(SOAPDecoder.java:248)     at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:78)     ... 40 more
    I shall appreciate any help on this issue

    Any luck? I'm having the same problem with the HelloService deployed on AS9. The service tests ok and the client code in the jwsdk2.0 runs ok. When I attempt to access the service using axis 1.4, the same error occurs. I'll keep working on it, and post a solution if/when this is resolved.
    Client code:
    * Copyright 2001-2004 The Apache Software Foundation.
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
    *      http://www.apache.org/licenses/LICENSE-2.0
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import javax.xml.namespace.QName;
    public class TestClient
       public static void main(String [] args) {
           try {
               String endpoint =
                        "http://localhost:9090/helloservice/HelloService";
               Service  service = new Service();
               Call     call    = (Call) service.createCall();
               call.setTargetEndpointAddress( new java.net.URL(endpoint) );
               call.setOperationName(new QName("http://soapinterop.org/", "sayHello") );
               // Call to addParameter/setReturnType as described in user-guide.html
               //call.addParameter("testParam",
               //                  org.apache.axis.Constants.XSD_STRING,
               //                  javax.xml.rpc.ParameterMode.IN);
               //call.setReturnType(org.apache.axis.Constants.XSD_STRING);
               String ret = (String) call.invoke( new Object[] { "Hello!" } );
               System.out.println("Sent 'Hello!', got '" + ret + "'");
           } catch (Exception e) {
               e.printStackTrace();
    }Error in decoding SOAP Message Error in decoding SOAP Message at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java
    89)
         at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.toMessageInfo(SOAPMessageDispatcher.java:187)
         at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher$SoapInvoker.invoke(SOAPMessageDispatcher.java:571)
         at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:145)
         at com.sun.xml.ws.server.Tie.handle(Tie.java:88)
         at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:191)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Caused by: javax.xml.ws.soap.SOAPFaultException: Cannot find the dispatch method
         at com.sun.xml.ws.encoding.soap.SOAPDecoder.raiseFault(SOAPDecoder.java:674)
         at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.decodeDispatchMethod(SOAPXMLDecoder.java:152)
         at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBodyContent(SOAPDecoder.java:337)
         at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBody(SOAPDecoder.java:327)
         at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeEnvelope(SOAPDecoder.java:250)
         at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:81)
         ... 31 more
    Mesage:
    <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:sayHello soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://soapinterop.org/"><ns1:arg0 xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">Hello!</ns1:arg0></ns1:sayHello></soapenv:Body></soapenv:Envelope>

  • Please help with "Error writing the project file. The specified module could not be found." error.

    I am a student.  I've been trying to install and use Visual Studio 2013 Professional for three weeks now and I cannot get it to work.  I am now two weeks behind in my Visual Basic class.  I've installed, uninstalled, ran the repair option... 
    I've tried everything I know how to do.  I just spent 45 minutes on the phone with Microsoft, was transferred four times and finally told I will have to use the forums to find an answer.  I'm almost completely out of patience with this.
    I got the software through the Dream Spark program as a student.  I installed it with the web installer and it appeared to install fine.  When I try to create a new project, I get the error:  "Error writing the project file.  The
    specified module could not be found."
    When I exit the application, I also get:  "The automatically saved settings file 'c:\users\user\documents\visual studio 2013\Settings\CurrentSettings-2015-02-02.vssettings' is not available for write.  You can change this file on the 'Import
    and Export Settings' Tools Options page."
    Please tell me you can help.

    Hi,
    could you please try the points mentioned here:
    http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/0376db8f-4761-4ae5-9af2-98c53216318a#VS_IDE_unexpected_problems to eliminate the possible cause of your issue?
    Please update the result in the forum after you try the method above!
    Best Wishes!
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
    href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

  • About the setting method of  Instant Messaging(collabo4.01)

    Please teach me the setting method of Instant Messaging ID ( yahoo ).
    Although an icon is displayed, it will not be in an offline state.

    Hi,
    You can debug you JSPDynpage either from NWDS with the help of break points or by writing log statements in your code which will be written in defaultTrace log file.
    Check this to debug from NWDS:
    NetWeaver Portal Debugging
    Check this to write log statements:
    http://help.sap.com/saphelp_nw70/helpdata/EN/b0/003c41325fa831e10000000a1550b0/frameset.htm
    Netweaver Portal Log Configuration & Viewing (Part 3)
    Regards,
    Praveen Gudapati

  • Implementation of the hasProperties() method of the Node class

    The following snippet of code prints:
    false
    true
    which seems to be a bug.
    TextField nameField = new TextField();
    System.out.println(nameField.hasProperties());
    ObservableMap<Object, Object> props = nameField.getProperties();
    System.out.println(nameField.hasProperties());The implementation of the hasProperties() method in the Node class returns true, if the ObservableMap object for storing properties has been created. That is not what is expected from this method. I think, this method should also check if the ObservableMap has any properties.
    Can someone confirm that it is a bug?
    Thanks
    Kishori

    You can log it at http://javafx-jira.kenai.com and then, if the developers want to keep it the way it is (which they may for API compatibility purposes), they can at least document it so that a user would know what to expect without writing a test or making a potentially invalid assumption.

  • How to keep track of all the classes/methods/properties created in a long script

    Hi,
    I'm curious to know what method people use to keep track of all the classes, methods, and properties you've created when writing a longer script.
    For quick scripts, this isn't a problem. But for long scripts it can get quite difficult to keep track of all the objects one has created, and all their methods and properties, and overloaded constructors, etc.
    ESTK is great, and it's the IDE I use for InDesign scripting, if only because of it's powerful debugging options.
    But it doesn't provide any way of keeping track of this stuff. No proper Intellisense as in Visual Studio.
    I'd be interested to hear how people solve this issue.

    Hi Ariel,
    Not sure it is relevant to your question but I have an old snippet that collects and displays ExtendScript references using $.list(). This may help to track some object relationships.
    // WARNING: this is just a WIP -- Not tested in all platforms and versions
    $.scanRefs = function scanRefs(/*0|1*/showAll)
        var s = $.list(),
            p = (!showAll) && s.indexOf('[toplevel]'),
            a = ((!showAll) ? s.substr(0,10+p) : s).split(/[\r\n]+/),
            n = a.length,
            // --- Address:1     L:2  Rf:3   Pp:4  Type:5  Name:6
            re = /^([0-9a-z]{8}) (.) +(\d+) +(\d+) (.{10}) (.{1,17})/,
            reTrim = / +$/,
            i, t, k, m,
            refBy, type, name, tag, rest, rfCount, props, j,
            o = {},
            TYPES = {'Function':"FCT", 'Object':"OBJ", 'Array':"ARR", 'RegExp':"REG"};
        for( i=2, refBy=0 ; i < n ; ++i )
            s=a[i];
            while( s && m=s.match(re) )
                k = '&'+m[1].toUpperCase();
                rfCount = parseInt(m[4],10);
                rest = s.substr(m[0].length);
                type = m[5].replace(reTrim,'');
                name = m[6].replace(reTrim,'');
                if( 0x5B==rest.charCodeAt(0) )
                    p = rest.indexOf(']');
                    tag = rest.substr(0,1+p);
                    rest = rest.substr(1+p);
                else
                    tag = '';
                if( 0x20==rest.charCodeAt(0) )
                    rest=rest.substr(1);
                if( p=!(rest.indexOf("referenced by:")) )
                    rest = rest.substr(14);
                o[k] || (o[k] = {
                    locked:        +('L'==m[2]),
                    rfCount:    parseInt(m[3],10),
                    ppCount:    rfCount,
                    type:        TYPES[type]||type,
                    name:        name,
                    tag:        tag,
                    from:        [],
                    order:        -1,
                if( 0 < refBy )
                    if( p || !rest ){ throw "Unable to parse references." }
                    props = rest.split(' ');
                    refBy -= (j=props.length);
                    while( j-- ) t.from.push([k,props[j]]);
                    (props.length=0)||(props=null);
                    rest = '';
                else
                    refBy = rfCount;
                    if( p != !!refBy )
                        if( p ){ throw "Unable to parse references."; }
                        refBy = 0;
                    (t = o[k]).order = n - i;
                (m.length=0)||(m=null);
                s = rest;
        a.length=i=0;
        for( k in o )
            if( !o.hasOwnProperty(k) ) continue;
            a[i++] = k;
        a.sort( function(x,y){return o[x].order-o[y].order;} );
        //a.sort( function(x,y){return parseInt(x.substr(1),16)-parseInt(y.substr(1),16);} );
        var u,
            pngLock = "\x89PNG\r\n\x1A\n\x00\x00\x00\rIHDR\x00\x00\x00\x0E\x00\x00\x00\x0E\b\x06\x00\x00\x00\x1FH-\xD1\x00\x00\x00\tpHYs\x00\x00\x0B\x13\x00\x00\x0B\x13\x01\x00\x9A\x9C\x18\x00\x00\x01VIDAT(\xCF\xA5\x91\xB1j\xC2P\x14\x86\x93\xD6\x94\x98\xA4\xB5\xA5\x85\x0E-R\xAF\xA5\xB8\xF4\x1D\xAA\xEF\x10_B\x9C\xDD\x0B]\xA4o`C\xE9$B\x1C\xCD\x10\x10C6\x05q\td\xA9%\x83d2\x83O\xF0\xF7\xDCp#i\xB5\x1D\xDA\xC0\xC7\xB97\xE7|\xF7\xDC\xCB\x91\x00H\x7FA\xFA\xB7\x98\xFF\xAA\xD5\xEA\x0B\x855\xC1\x13k\xDA\xBF\xEA\x9A\xA6\x9C\x18\xC6\xC1\xB6\xE8\xBBHE\x16\x85w\xC6\xD8\xE3\x91\xA2\xDCQ|\xA2\xFD\x07\xC57\xADXT\x8B\xAAz\xB8#\x8A\x13\xD7\xBC\xD8\xD0\xB4kC\xD7\x19q\xCB*\x95g\xFA\x9FP\xD7\x0B\x8A\n!oE.\xB5Z-\xEC\xA3\xD9l\xA2\xFEP\x07\x1D\xC8;\x18D!/\x16x\x91\xEF\xFBX.\x97\xD8l6H\x92$]O\xA7S\x8CF#\x887\x9F\x13j^T\xB9\xD8\xE9t0\x99L\x10\xC71V\xAB\x15\x82 \xC0\xD0\x1E\xA2\xDDng\xE2\x15q\x9C\x175.:\x8E\x83\xC5b\x81(\x8A \xCB2\xE6\xF39\\\u00D7E\xBF\xDF\xCF\xC4\x1B\xE24/\x1A\\\u00ECv\xBB\xF0<\x0Fa\x18\xA2\xD1h`<\x1E\xC3\xB2,\x98\xA6\x99\x89\x8C8\xDB\x11\x07\x83AzU\xDEu6\x9B\xA5\xA2m\xDB\xE8\xF5z?\x8B4\xC3,\xF9\x1B_E1\x9F\x12Q&j\xC4\xFD\x1Ej\"_\xCA\x8B\x051\xA3K\x91d{(\x8B\xBC\xFE\t\xC1TI!\xE3L\x03\x7F\x00\x00\x00\x00IEND\xAEB`\x82",
            pngNop = "\x89PNG\r\n\x1A\n\x00\x00\x00\rIHDR\x00\x00\x00\x0E\x00\x00\x00\x0E\b\x03\x00\x00\x00(\x96\xDD\xE3\x00\x00\x00\x03PLTE\x00\x00\x00\xA7z=\xDA\x00\x00\x00\x01tRNS\x00@\xE6\xD8f\x00\x00\x00\x15IDATx\xDA\xDD\xC1\x01\x01\x00\x00\x00\x80\x90\xFE\xAF\xF6#\xDA\x01\x00\xD2\x00\x01\xCC \x10\x14\x00\x00\x00\x00IEND\xAEB`\x82",
            w = new Window('dialog', " ExtendScript Memory"),
            p1 = w.add('panel', u, "References"),
            lRefs = p1.add('listbox', u, "",
                numberOfColumns: 4,
                showHeaders: true,
                columnTitles: ["Address", "Type", "Name", "Refs"],
                columnWidths: [90,60,120,36],
            g = w.add('group'),
            pFrom = g.add('panel', u, "From"),
            lFrom = pFrom.add('listbox', u, "",
                numberOfColumns: 4,
                showHeaders: true,
                columnTitles: ["Address", "Type", "Name", "Property"],
                columnWidths: [90,60,120, 120],
            pTo = g.add('panel', u, "To"),
            lTo = pTo.add('listbox', u, "",
                numberOfColumns: 4,
                showHeaders: true,
                columnTitles: ["Property", "Address", "Type", "Name"],
                columnWidths: [120,90,60, 120],
        g.orientation = 'column';
        w.orientation = 'row';
        w.alignChildren = ['left','top'];
        lRefs.maximumSize = lRefs.minimumSize = [330,450];
        lFrom.maximumSize = lFrom.minimumSize = [420,120];
        lTo.maximumSize = lTo.minimumSize = [420,220];
        lRefs.onChange = function()
            lFrom.removeAll();
            lTo.removeAll();
            lFrom.parent.text = "From";
            lTo.parent.text = "To";
            if( !this.selection ) return;
            var key = '&'+this.selection.text,
                t = o[key],
                from = t.from,
                i = from.length,
                k;
            lFrom.parent.text = "["+key.substr(1)+"] is reachable from " + t.ppCount + (1<t.ppCount ? " properties" : " property");
            if( t.ppCount && !i )
                with( lFrom.add('item', '--------') )
                    image = pngNop;
                    subItems[0].text = '';
                    subItems[1].text = '<UNKNOWN REFERRER>';
                    subItems[2].text = '';
            while( i-- )
                k = from[i][0];
                t = o[k];
                with( lFrom.add('item', k.substr(1)) )
                    image = t.locked ? pngLock : pngNop;
                    subItems[0].text = t.type;
                    subItems[1].text = t.name + ' ' + t.tag;
                    subItems[2].text = from[i][1];
            for( k in o )
                if( !o.hasOwnProperty(k) ) continue;
                t = o[k];
                from = o[k].from;
                i = from.length;
                while( i-- )
                    if( from[i][0]!=key ) continue;
                    with( lTo.add('item', from[i][1]) )
                        image = pngNop;
                        subItems[0].text = k.substr(1);
                        subItems[1].text = t.type;
                        subItems[2].text = t.name + ' ' + t.tag;
            lTo.parent.text = "["+key.substr(1)+"]'s properties had access to " + lTo.items.length + " addr.";
            from = t = null;
        for( i=0, n=a.length ; i < n ; ++i )
            t = o[k=a[i]];
            with( lRefs.add('item', k.substr(1)) )
                image = t.locked ? pngLock : pngNop;
                subItems[0].text = t.type;
                subItems[1].text = t.name + ' ' + t.tag;
                subItems[2].text = t.ppCount + '/' + t.rfCount;
        w.show ();
    // TEST
    var t;
    var f = function MyFunc()
        (function MyInnerFunc(){})();
    $.scanRefs(1);
    @+
    Marc

  • Understanding Comparable and the compareTo( ) method

    I have a Contact object which lists a person's information for a "phone book" program.
    I am trying to sort the Contact objects in a Vector by way of their last name fields.
    I am having a hell of a time trying to use this compareTo( ) method.
    I'm really struggling with understanding how to go about making the method work with a comparison. Most of the examples which I find compare "numbers' and not strings which make it more difficult to understand.
    I have implimented the comparable Interface at the start of my class. To sort my Vector, I'm attempting to use the compareTo( ) method to determine which Last name field has the lower value. I keep going back and forth working through the error messages I receive and I'm just stumped trying to figure out how to get this thing to work. Can someone please point out the mistakes without writing too much code? I don't want someone to do the work for me. Here is the code:
    import java.io.*;
    import java.util.*;
    class PhoneBook implements Comparable{
         private static Vector v = new Vector();
         private static Iterator iter = v.iterator();
         private static int num, index;
         private static Contact firstContact, secondContact, temp;  //"static" to be referenced from main
         public static void main(String arg[])throws Exception {
              Contact c;
              String str;
              BufferedReader br = new BufferedReader(
          new InputStreamReader(
               new FileInputStream(
                                           new File("contacts.txt"))));
              while((str = br.readLine()) != null){
               v.add(c= new Contact(br.readLine()));
               num = v.size();
               for(int i=0; i < num; i++){
          firstContact = (Contact)v.elementAt(i);
               if(v.elementAt(++i) == null)
                    break;
               else
                    secondContact = (Contact)v.elementAt(++i);
               index = compareTo(firstContact);
               if(index == 1){
                       temp = (Contact)v.elementAt(i);
                       v.setElementAt(v.elementAt(++i), i);
                       v.setElementAt(temp, ++i);
              public static int compareTo(Object person){
         int x = ((Contact)person).getLName().compareTo(secondContact.getLName());
         return x;
    }yet still I get the following compiler error:
    PhoneBook.java:4: compareTo(java.lang.Object) in PhoneBook cannot implement compareTo(java.lang.Object) in java.lang.Comparable; compareTo(java.lang.Object) and compareTo(java.lang.Object) are static
    class PhoneBook implements Comparable{
    ^
    1 error

    You are pretty close here except for one incorrect basic assumption. Your compiler error is because you are trying to implement compareTo() with a static method. However, this is irrelevant because it is not the PhoneBook class that should implement Comparable, but the Contact class.
    The idea is that other functions can call the compareTo() method on an instance of Contact and pass a reference to a second instance. Based on the result, the relative sort order of the two objects can be determined.
    e.g.Contact c1 = new Contact("Smith", "John");
    Contact c2 = new Contact("Jones", "Alan");
    int x = c1.compareTo(c2);In your example, you can implement compareTo() to use the corresponding method in String. For compatibility, you should also implement equals().
    public class Contact implements Comparable {
       public int compareTo(Object otherContact) {
           Contact otherC = (Contact) otherContact;  // could throw exception
           return getLName().compareTo(otherC.getLName());
       public boolean equals(Object otherContact) {
           Contact otherC = (Contact) otherContact;  // could throw exception
           return getLName().equals(otherC.getLName());
    } // end of class Contact I haven't compiled or tested the above code nor does it deal with exceptions (e.g. otherContact is not an instance of Contact) - I'll leave that to you! You'll also need to change your PhoneBook sort routine to invoke firstContact.compareTo(secondContact)
    FYI - I understand that this is an academic exercise and so you may need to code the sort yourself, but once Contact implements Comparable, you could sort the Vector using standard Java methods. Check out java.util.Collections - there is a method that will perform your sort in one line of code.
    Good Luck.

  • Help in the add method

    how can i implement the code in the add method, and how should i add a main method to print the list.
    import java.util.*;
    public class SinglyLinkedList implements List
      // an inner class: This is our node class, a singly linked node!
      private class Node
        Object data;
        Node next;
        Node(Object o, Node n)
          data = o;
          next = n;
        Node(Object o)
          this(o, null);
        Node( )
          this(null,null);
      private Node head; // the "dummy" head reference
      private int size;  // the number of items on the list
      public SinglyLinkedList()
        head = new Node(); // dummy header node!
      public void add(int index, Object o)
      //need some help here
      public boolean add(Object element)
           if (element == null) return false;
           // Check for dummy head node
           if (head.data == null)
                head = new Node(element, null);
        else
        // Traverse the list until we find the end
        Node next = head;
        while (next.next != null)
             next = next.next;
        next.next = new Node(element, null);
        return true;
    public static void main (String[] args){
      //need some help here
    }

    you not need to implement List you can just use add methods of it cause
    if you implementing it without implements all the methods in it then you
    must declare you class as abstract class;
    if you implemets List then your class should contains all the methods of interface List for example
    import java.util.*;
    public class SinglyLinkedList implements List
      // an inner class: This is our node class, a singly linked node!
      private class Node
        Object data;
        Node next;
        Node(Object o, Node n)
          data = o;
          next = n;
        Node(Object o)
          this(o, null);
        Node( )
          this(null,null);
      private Node head; // the "dummy" head reference
      private int size;  // the number of items on the list
      public SinglyLinkedList()
        head = new Node(); // dummy header node!
      public void add(int index, Object o)
        //need some help here
      public boolean add(Object element)
        if (element == null) return false;
        // Check for dummy head node
        if (head.data == null)
          head = new Node(element, null);
        else
          // Traverse the list until we find the end
          Node next = head;
          while (next.next != null)
            next = next.next;
          next.next = new Node(element, null);
        return true;
      public int size(){
      return 0;
      public boolean isEmpty(){
        return false;
      public boolean contains(Object o){
        return false;
      public Iterator iterator(){
        return null;
      public Object[] toArray(){
        return null;
      public Object[] toArray(Object a[]){
        return null;
      public  boolean remove(Object o){
        return false;
      public boolean containsAll(Collection c){
        return false;
      public  boolean addAll(Collection c){
        return false;
      public boolean addAll(int index, Collection c){
        return false;
      public boolean removeAll(Collection c){
        return false;
      public boolean retainAll(Collection c){
        return false;
      public void clear(){}
      public boolean equals(Object o){
        return false;
      public  int hashCode(){
        return 0;
      public Object get(int index){
        return null;
      public  Object set(int index, Object element){
        return null;
      public Object remove(int index){
        return null;
      public int indexOf(Object o){
        return 0;
      public int lastIndexOf(Object o){
        return 0;
      public ListIterator listIterator(){
        return null;
      public ListIterator listIterator(int index){
        return null;
      public List subList(int fromIndex, int toIndex){
        return null;
      public static void main (String[] args){
        //need some help here
    }

  • JSF 2 composite comp. backing class: what can I use for the decode method?

    Hello, everybody!
    I want to convert a JSF 1.2 custom component to a JSF 2.0 composite component. This JSF 1.2 custom component uses a renderer where I take some actions in the decode method. So, I would like to know what I could use to replace the well known decode method when writing a backing class for a JSF 2.0 composite component.
    Thank you.
    Marcos
    Edited by: Marcos_AntonioPS on May 21, 2010 11:59 AM

    Let's try with org.havi.ui.HStaticText

  • I cannot figure out how to make the text larger on an incoming email.  The finger method doesn't work and I cannot find any toolbar with which to do it.  I could find nothing in settings also.  Plese help and thank you.

    I cannot figure out how to make the text larger in a received email.  The finger method doesn't work and I can find no tool bar as I can for composing emails.  I can find nothing in settings.  Please help and thank you in advance.

    Hi there,
    Download a piece of software called TinkerTool - that might just solve your problem. I have used it myself to change the system fonts on my iMac. It is software and not an app.
    Good wishes,
    John.

  • Calling the Java Method in PL/SQL Java Stored procedure errors out

    Hi,
    I could not find a suitable thread to post my PL/SQL question so iam posting it here.........
    I have written a java class by name XYZ which has a method ABC for which there are 9 arguements being passed and its a VOID method.
    This java class has been loaded into ORACLE using DBMS_JAVA.LOADJAVA pkg, Now this class is being called in the oracle as a JAVA Stored procedure...... When ever im trying to call the procedure it throws the following error
    ORA-29531: no method
    *Cause:    An attempt was made to execute a non-existent method in a
    Java class.
    *Action:   Adjust the call or create the specified method.
    The code snippet as follows
    JAVA CODE:
    Class xyz
    public static void Abc (String hostName,
    int port,
    String serviceURL,
    String soapAction,
    int timeOut,
    String wsUser,
    String wsPasWd,
    String keyStore,
    String keyStorePasWd)
    //method implementation
    JAVA STORED PROCEDURE:
    create OR REPLACE procedure ABC_JAVA_SP_CALL
    (p_hostname in varchar2, p_port in number, p_serviceurl in varchar2, p_soapaction in varchar2, p_timeout in number, p_wsuser in varchar2, p_wspasswd in varchar2, p_ks_path in varchar2, p_ks_passwd in varchar2)
    as
    language java
    name 'xyz.Abc(java.lang.String, int, java.lang.String, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String)';
    When i try to call
    declare
    p_hostname varchar2(100);
    p_port number;
    p_serviceurl varchar2(100);
    p_soapaction varchar2(100);
    p_timeout number;
    p_wsuser varchar2(100);
    p_wspasswd varchar2(100);
    p_ks_path varchar2(100);
    p_ks_passwd varchar2(100);
    begin
    //SP which returns the values for the required parameters.
    comppkg.getvcsinfo(
    p_hostname,
    p_port ,
    p_serviceurl,
    p_soapaction,
    p_timeout,
    p_wsuser,
    p_wspasswd,
    p_ks_path,
    p_ks_passwd
    Layer7_icengc_ws_tes(p_hostname,
    p_port ,
    p_serviceurl,
    p_soapaction,
    p_timeout,
    p_wsuser,
    p_wspasswd,
    p_ks_path,
    p_ks_passwd);
    end;
    This thing ends up with
    29531. 00000 - "no method %s in class %s"
    *Cause:    An attempt was made to execute a non-existent method in a
    Java class.
    *Action:   Adjust the call or create the specified method.
    Im not understanding what wrong am i doing
    pls help
    Edited by: madhusudan on Feb 12, 2013 8:07 PM

    Hello,
    there is the forum {forum:id=65} for questions about using Java within Oracle.
    Regards
    Marcus
    Edited by: Marwim on 13.02.2013 07:56
    I could not find a suitable thread to post my PL/SQL question so iam posting it here.........You got the hint to the correct forum alread in another thread {message:id=10837976}
    And if you think this is not related to Java but PL/SQL, then you should ask in {forum:id=75}

Maybe you are looking for

  • Timeout of session / entity bean

    Hi all We are facing "RollbackException: The transaction has been marked for rollback (timed out)" excpetion. please help us in resolving this. Here is problem description. Code Description: Step1: Action class calls Session bean Step2:Session Bean d

  • MySQL and Java - getting program to work

    I am setting up mysql to run sql from a Java program on my pc at home and probably biting off more than I can chew. I get these messages when executing the java program ExecuteSQL.java: Exception in thread "main" java.lang.NoClassDefFoundError: Test2

  • Windows 7 is Not suitable hp notebooks right now

    if u really have vista throw it away windows 7 is the best  first hey and it took me long enough to know that there is fourm to share ideas with some body so now here is the thing i have hp pavillion dv 6755ee i purchase it 1 year ago so i worked on

  • Derived Table - Stored Procedure.

    Hi all, Can any tell how you call stored procedure from Derived table. and how manage the IN parameters ? thnx in advance

  • URGENT : Pls help on Personnel Calculation Rules

    Hello Gurus, I am creating new rule to change the attendance type depending on the holiday. What is the operation/function should I use. Senaio: There is a 'Holiday Hrs Worked' attendance type and this has to be used ONLY when an emp is working on a