How to make a method Synchronous in Repository Information System ?

In SE80 Transaction i create a copy of object TSTC. I want to set the Execute method of that object to Synchronous. I tried in Repository information system but could not find anything related to it. Can anyone help me?
Thank you.

Hi Sandesh,
Check if this two excellent weblogs may help you:
/people/vikash.krishna/blog/2008/09/23/crm-2007-how-to--2-a-transaction-launcher
/people/raja.g/blog/2007/01/24/displaying-r3-transaction-in-icwc-application
They have a step-by-step example, either with SE80, either with SWO1.
Kind regards,
Garcia

Similar Messages

  • How to create user group for EIS (Executive Information System) KCBA

    Dear Experts,
    How to create user group for EIS (Executive Information System)
    TCode KCBA
    Regards
    Saurabh

    Hi ,
    Check the below link ,hope it will give some inputs for creating groups.
    http://help.sap.com/saphelp_470/helpdata/en/5c/c1c81c445f11d189f00000e81ddfac/content.htm
    Regards
    udayakumar.k

  • How to make a method global so that it can be used in another component.?

    Hi,
    Is it possible to make a method global so that it can be used in another component.?
    i.e I have one component C1 and methods declared in this component M1, M2, ...
    Now I have another component C2 and in this component i want to use method M1 of component C1.
    how to do so?
    Any inputs will be appreciated.
    Thanx.

    Hi,
    As Uday said, To make the method as global of component say C1, You have to make method as interface by clicking the check box.
    Now while using the method in other component say C2, you have to follow following steps:
    1. In used component of comp. C2, add component C1.
    2. Instantiate the component atleast once in any of the method of component using code wizard option:
    'Instantiate Used Componet'.
    3. Now you can call the method of component C1 using code wizard option 'Method call in used controller'

  • How I make deprecated method in JB4

    Hi, i make deprecated method like this:
    * @deprecated
    public String fillCharsToLimit(String value, int limit, char chr, boolean fromFirst) {
    value = value.trim();
    if (value == null || (value.length() == 0 && limit <= 0))
    ;//do st
    (in project properties i enable Show deprecations)
    I except that compiler say me warning.
    Its ignore deprecation in my code, but when I use deprecated method from JDK all is OK, only my method no why?
    Thanks DK

    You don't get a deprecation warning if the deprecated class or method and the code that uses the deprecated class or method are compiled at the same time. See Bug 4216683 http://developer.java.sun.com/developer/bugParade/bugs/4216683.html for details.

  • How to make a method sleep without affecting the responsiveness of the GUI

    Hi,
    I want to make a method sleep for a few second before executing the rest of its body. Apparently Thread.sleep(10000) doesn't do the job as it makes the GUI non-responsive.
    Any advice would be deeply appreciated.
    Thomas

    Here's an example:
    package tjacobs.ui.ex;
    import java.awt.Color;
    import javax.swing.Icon;
    import javax.swing.JLabel;
    import tjacobs.ui.util.WindowUtilities;
    * @author tjacobs
    public class Blink extends JLabel implements Runnable {
         public static final long DEFAULT_TIME_LENGTH = 1000;
         private long mTimeLength = DEFAULT_TIME_LENGTH;
         private String mLabel;
         private Icon mIcon;a
         public void run() {
              mLabel = getText();
              mIcon = getIcon();
              try {               
                   while (true) {
                        Thread.sleep(mTimeLength);
                        String current = getText();
                        if (current.equals(mLabel)) {
                             setText("");
                             setIcon(null);
                        else {
                             setText(mLabel);
                             setIcon(mIcon);
                        repaint();
              catch (InterruptedException ex) {
                   ex.printStackTrace();
              finally {
                   setText(mLabel);
                   setIcon(mIcon);
         public Blink() {
         public Blink(String arg0) {
              super(arg0);
         public Blink(Icon arg0) {
              super(arg0);
         public Blink(String arg0, int arg1) {
              super(arg0, arg1);
         public Blink(Icon arg0, int arg1) {
              super(arg0, arg1);
         public Blink(String arg0, Icon arg1, int arg2) {
              super(arg0, arg1, arg2);
         public void setBlinkTime(long time) {
              mTimeLength = time;
         public long getBlinkTime() {
              return mTimeLength;
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              Blink b = new Blink("Hello World");
              b.setBackground(Color.RED);
              WindowUtilities.visualize(b);
              b.setFont(b.getFont().deriveFont(24.0f));
              b.run();
    }

  • How to make entry for transit loss in the system

    Hello to all,
    I am having an issue with one subCon material.
    Suppose,
    Material A is the product required of 3000 MT Qty.
    SubCon vendor have sent that qty, but there is a transit loss of 500 MT.
    How to make entry for this transit loss in the system.
    regards,
    Anisha

    correct me if i am wrong-
    ur scenario is
    for making material A ,
    3000 MT of material B required.
    but for producing A vendor uses 3500MT of B
    solution : if this ia the case then u can overwrite the value of B at GRN from 3000MT to 3500MT.
    OR
    ur scenario is -
    u require material A of 3000MT
    vendor sends u 3000MT
    but actualy u recieve 2500MT
    and u have to pay for 3000MT as per bill
    solution : if this is ur scenario then.
    prerequisite-activate direct posting to G/L and material at MIRO
    Path - SPRO->MM->LIV->activate direct posting to G/L and material at MIRO.
    now procedure is -
    step 1) do GR for 2500MT
    step2) in LIV pay to vendor for 3000MT for that put 500 qty in material tab and the relavent amount.
    in this way loss in transite will be book on inventory.
    regards,
    sujit

  • AT300-101 - how to make a back up of the operating system?

    Hi
    I am tearing my hair out ! i am sending my AT300-101 toshiba tablet away tomorrow to have the battery changed but have only just realised the email booking the repair has said i have to make a back up of the operating system / replacement recovery media. after trawling the web trying to work out how to do it I am still stuck. can anyone help me with this please. It would be a big help.
    Thanks.
    Kate

    Hi
    There are many different ways to backup the date from android device.
    You can use some 3rd party backup apps (check the Google Play store for available apps) or you can use the Android internal option to backup the data, application, Wifi passwords and other settings to google servers.
    Such option can be found in App Apps -> Settings -> Backup & Restore

  • How to make update method permanent once and forever?

    Hi,
    Every time I get an update to Flash and install it, at the end of the install I get the three update choices of ‘Allow Adobe to install updates (recommended)’, ‘Notify me to install updates’ and ‘Never check for updates (not recommended)’. Every time I choose the second option and every single subsequent time there is an update I have to go through the same procedure again because the first option becomes selected. I do NOT want Adobe to perform automatic updates. Is there a way to set it to notify me of updates but never bug me to change my update method? I have tried changing the setting through the Control Panel but this doesn’t make any difference either. I just want to be notified of updates but not be pestered with those same three options EVERY time.

    This answer is NOT working. The line "SilentAutoUpdateEnable=0" is already present. And it still queries for the annoying question, even when asked and answered ad nauseum.
    Adobe should in the very next update, as a minimum, make it such, that the chosen value in "Choose your update method:" remains PERMANENT and FOR EVER until the user changes it. It is WILDLY annoying to have to answer this question over and over and over and over and over and over again. Make a new value or something that will be written to the mms.cfg file, that will permanently understand this setting, I Want to update, but I want to know when and how and why, and I especially want to do it myself - Automatic updates can for novice users be nice, until it screws up the entire system - but for super user level or above it is an annoyance, that programs do not respect the answers of the user. It SHOULD ask this question ONCE, and never ever there after - unless the user changes the behaviour, in e.g. the mms.cfg file.
    I hope this is crystal clear --- it should be, and I cannot fathom that millions of other users are not annoyed by this popup box ... When i press "DONE" ... it should be EXACTLY THAT - notify me to install updates, BUT NOT to ask it every time what "update method" i want to use -- i've only told you a million times before --- just freaking get the answer and understand it.
    Annoyed regards : CyberstormXIII

  • How to make reusable methods?

    I have a program that reads through a collection of project Ids, connects to a website, inputs the project id in one at a time. I then collect data from the website and insert it into a DB. I have code in my program that I have copied over and over again, but have modified certain variables, strings etc... to get it to work. It works great, but I want to make this code that I use over and over, into a method(s) that I can just call when ever I feel like it.
    below is the posted program. Please Note that the urls that are being connected to are not real, I have taken them out so that the data on this site is protected. The createProject is the method that has all the crazy code. I am sorry for this code, I know its probably terrible, but I am a newbie. Thanks public class URLReader
        public URLReader()
           dbConn = new DBConnection();      
       public java.util.Collection getProjectIDs() throws Exception 
          // get the progrect ID's from our database
            java.util.ArrayList projectIds = new java.util.ArrayList();
            dbConn.dbConnection();
            java.sql.Statement stmt = dbConn.createStatement();
            String SQL = "SELECT distinct PROJECT_ID FROM EMSP.PROJECTS";
            java.sql.ResultSet rs = stmt.executeQuery(SQL);
            while(rs.next())
                    projectIds.add(new Integer(rs.getInt("PROJECT_ID")));
            System.out.println("Project ID " + projectIds);
            System.out.println("Project ID Length " + projectIds.size());
            dbConn.close();
           return projectIds;
       public String extractString( String text)  // I think I can already use this method over and over again
          int count = 0;
          char separator = ' ';
          // Determine the number of substrings
          int index = 0;
          do
             ++count;
             ++index;
             index = text.indexOf(separator, index);
          while (index != 1);
          //Extract the substring into an array
          String[] subStr = new String[count];
          index = 0;
          int endIndex = 0;
          for(int i = 0; i < count; i++)
             endIndex = text.indexOf(separator, index);
             if(endIndex == -1)
                subStr[i] = text.substring(index);
             else
                subStr[i] = text.substring(index,endIndex);
             index = endIndex + 1;
          return text;
       public static java.lang.String getString(String text, String target, String startTag, String endTag)
          int offset = text.indexOf(target);
              if (offset == -1) return "";
              int start = text.indexOf(startTag, offset);
              if (start == -1) return "";
              start += startTag.length();
              int end = text.indexOf(endTag, start);
              return end == -1 ? "" : text.substring(start, end);
       public Project createProject(int projectId) throws Exception
          Project proj = new Project();
          try
              /******************Project Details Page**********************/
                java.net.URL projectDetails = new
                java.net.URL("http://someSite.com/portfolio/ProjectDetails.asp?Source=Tracking&Key="+projectId);
                java.io.BufferedReader in =
                            new java.io.BufferedReader(new java.io.InputStreamReader(projectDetails.openStream()));
                String projDetailspage = new String("");
                String inputLine = "";
                while ((inputLine = in.readLine()) != null)
                    projDetailspage = projDetailspage.concat(inputLine.trim());
                System.out.println("project ID: "+ projectId);
                //**** get the contact Details Page ID  from Project Details Page****/
                String contactDetailsId ="";                       
                String contactDetailsStr = (String)(projDetailspage.split("\\<h3\\>Project Details\\</h3\\>")[1].split( 
                "\\<td valign=\"top\"\\>")[1].split("\\=\"ChangeImage\\(")[0].trim());
                // takes the string that was ripped out between the opening and closing tags
                // searches for an integer and then coverts it to a string.
                String conId = "";
                java.util.regex.Pattern conDetStr = java.util.regex.Pattern.compile("\\b(\\d+)\\b");
                java.util.regex.Matcher conDetMatch = conDetStr.matcher(contactDetailsStr);
                conDetMatch.find();
                conId = conDetMatch.group(1); // assuming it matched...
                System.out.println( "\tcontactDetails ID:"+ conDetMatch.group(1).toString());
                //**** extract the Data from Project Details Page ****//
                String projectTitle = (String)(projDetailspage.split("\\<[Bb]\\>Project Title:\\</[Bb]\\>")[1].split( 
                "\\<font size=\"-1\"\\>")[1].split("\\</font\\>")[0].trim());
                String LeadPI= (String)(projDetailspage.split("\\<[Bb]\\>Lead PI:\\</[Bb]\\>")[1].split( 
                "\\<font size=\"-1\"\\>")[1].split("\\</font\\>")[0].trim());
                 // This code I have copied and posted alot into different places.
                int count= 0;
                while(LeadPI.charAt(count)!=',')
                    count++;
                String investigator=LeadPI.substring(0,count).trim();
                String institution=LeadPI.substring(count+2, LeadPI.length());
                institution = institution.trim();
                System.out.println("\tinvestigator: "+investigator);
                System.out.println("\tinstitution: "+institution);
                /*********************** new test stuff  *********************/
                String text = projDetailspage;
                String target = ">Researcher(s):<";
                String startTag = "<font size=\"-1\">";
                String endTag = "</table>";
                String researchers = Testing.getString(text, target, startTag, endTag);
                System.out.println("researchers before for loop: "+ researchers);
                researchers = researchers.replaceAll("\\<.*?\\>","|").replaceAll("\\|+","|").replaceAll(",.*?\\|",",");
                researchers = researchers.replaceAll("<td width=\"70%\" align=\"left\" valign=\"top\">", "" ).replaceAll("><td width=\"30%\">","" );
                String[] investigators = researchers.substring(1,researchers.length() - 1).split(",");
                System.out.println("investigator1 = "+investigators[0]);
                System.out.println("investigator2 = "+investigators[1]);
                System.out.println("investigator3 = "+investigators[2]);
                System.out.println("investigator4 = "+investigators[3]);
                for(int x = 0; x < investigators.length; x++)
                   System.out.println("New researchers are now Investigators: " +investigators[x].toString()); 
                /*********************** end test stuff  *********************/
                /*************** Contact Details Page ***********************/
                contactDetailsId = conId;  // gets its url(projectId) from the previous page projectDetailsPage
                java.net.URL contactDetails = new
                java.net.URL("http://someSite.com/portfolio/ContactDetails.asp?ProjectID="+contactDetailsId);
                in = new java.io.BufferedReader(new java.io.InputStreamReader(contactDetails.openStream()));
                String conDetailsPage = new String("");
                inputLine = "";
                while ((inputLine = in.readLine()) != null)
                    conDetailsPage = conDetailsPage.concat(inputLine.trim());
                //**** get the contact Full Details ID  ****/
                String contactFullDetailsId ="";
                String institutionId = "";
                String contactFullDetailsStr= (String)(conDetailsPage.split("\\<[Bb]\\>Principal Investigator\\</[Bb]\\>")[1].split( 
                "\\<li\\>")[1].split("\\</a\\>")[0].trim());
                String institutionDetailsStr= (String)(conDetailsPage.split("\\<[Bb]\\>Principal Investigator\\</[Bb]\\>")[1].split( 
                "\\</li><ul><li\\>")[1].split("\\</a\\>")[0].trim());
                // takes the string that was ripped out between the opening and closing tags
                // searches for an integer and then coverts it to a string.
                String fullId = "";
                java.util.regex.Pattern conFullDetId = java.util.regex.Pattern.compile("\\b(\\d+)\\b");
                java.util.regex.Matcher conFullMatch = conFullDetId.matcher(contactFullDetailsStr);
                conFullMatch.find();
                fullId = conFullMatch.group(1); // assuming it matched...
                System.out.println( "\tcontactFullDetailsID: "+ conFullMatch.group(1).toString());
                String instiId = "";
                java.util.regex.Pattern instiStr = java.util.regex.Pattern.compile("\\b(\\d+)\\b");
                java.util.regex.Matcher instiMatch = instiStr.matcher(institutionDetailsStr);
                instiMatch.find();
                instiId = instiMatch.group(1); // assuming it matched...
                System.out.println( "\tinstitution ID:"+ instiMatch.group(1).toString());
                //String str = (String)(projDetailspage.split("\\<[Bb]\\>Researcher(s):\\</[Bb]\\>")
                //[1].split( "\\<font size=\"-1\"\\>")[1].split("\\</font\\>")[0].trim());
                //System.out.println("String before replace all: "+ str);
                //**** get the Institution Details ID ****/
                //String institutionsID = instiId;
                //institutionsID = (String)(projDetailspage.split("\\<h3\\>Principal Investigator\\</h3\\>")[1].split( 
                //"\\<li><a href=InstDetails.asp?InstitutionID\\=")[1].split("\\</a\\>")[0].trim());
                //System.out.println("InstitutionID: "+institutionsID);
                /************* Contact Full Details Page ********************/
                contactFullDetailsId = fullId;
                java.net.URL contactFullDetails = new
                java.net.URL("http://someSite.com/portfolio/ContactFullDetails.asp?Mode=P&ID="+contactFullDetailsId);
                in = new java.io.BufferedReader(new java.io.InputStreamReader(contactFullDetails.openStream()));
                String conFullDetailsPage = new String("");
                inputLine = "";
                while ((inputLine = in.readLine()) != null)
                    conFullDetailsPage = conFullDetailsPage.concat(inputLine.trim());
                /**** extract the Data from Project Details Page ****/
                 String investigatorTitle = (String)(conFullDetailsPage.split("\\<[Bb]\\>Title:\\</[Bb]\\>")[1].split( 
                "\\<font size=\"-1\"\\>")[1].split("\\</font\\>")[0].trim());
                String investigatorPhone = (String)(conFullDetailsPage.split("\\<[Bb]\\>Phone:\\</[Bb]\\>")[1].split( 
                "\\<font size=\"-1\"\\>")[1].split("\\</font\\>")[0].trim());
                String investigatorEmail = (String)(conFullDetailsPage.split("\\<[Bb]\\>E-mail:\\</[Bb]\\>")[1].split( 
               "\\<font size=\"-1\"\\>")[1].split("\\</font\\>")[0].trim());
                String department = (String)(conFullDetailsPage.split("\\<[Bb]\\>Mailing Address:\\</[Bb]\\>")[1].split( 
               "\\<font size=\"-1\"\\>")[1].split("\\</font\\>")[0].trim());
                count= 0;
                while(investigatorEmail.charAt(count)!='>')
                    count++;
                String investiEmail=investigatorEmail.substring(0,count).trim();
                String email=investigatorEmail.substring(count+1, investigatorEmail.length());
                email = email.replaceFirst("</a>", "");
                //getContactName - FirstName, MiddleI, LastName, Prefix.
                //getContactAddress - Street, City, State, Zip.
                /*************** Institution Details Page *******************/
                institutionId = instiId;
                java.net.URL institutionDetails = new
                               java.net.URL("http://someSite.com/portfolio/InstDetails.asp?InstitutionID="+institutionId);
                in = new java.io.BufferedReader(new java.io.InputStreamReader(institutionDetails.openStream()));
                String instDetailsPage = new String("");
                inputLine ="";
                while ((inputLine = in.readLine()) != null)
                    instDetailsPage = instDetailsPage.concat(inputLine.trim());
                /**** extract the Data from Project Details Page ****/
                String institutionType = (String)(instDetailsPage.split("\\<[Bb]\\>Institution Type:\\</[Bb]\\>")[1].split( 
                "\\<font size=\"-1\"\\>")[1].split("\\</font\\>")[0].trim());
                String institutionURL = (String)(instDetailsPage.split("\\<[Bb]\\>Web Site Home Page:\\</[Bb]\\>")[1].split( 
               "\\<font size=\"-1\"\\>")[1].split("\\</font\\>")[0].trim());
                count= 0;
                while(institutionURL.charAt(count)!='>')
                    count++;
                String instiURL=institutionURL.substring(0,count).trim();
                String url=institutionURL.substring(count+1, institutionURL.length());
                url = url.replaceFirst("</a>", "");
                System.out.println("\turl: "+ url);
                 //"\\<li\\>")[1].split("\\</a\\>")[0].trim());
                //System.out.println("InstitutionID: "+institutionType);
                //getInstName
                //getInstType
                //getInstAddress - City, State, Zip
                //getInstURL
           /*************** Set the Project Objects ***********************/
                //**** Idaho Project Objects ****//
                proj.setProjectTitle(projectTitle);
                proj.setProjectId(projectId);
                //**** Idaho Investigator Objects ****//
                proj.setInvestigator(investigator);
                proj.setInstitution(institution);
                proj.setInstitutionType(institutionType);
                proj.setInstitutionURL(url);
                proj.setInvestigatorTitle(investigatorTitle);
                proj.setInvestigatorPhone(investigatorPhone);
                proj.setEmail(email);
                proj.setDepartment(department);
           catch( java.lang.NullPointerException npe)
              System.out.println("npe error" + npe);
          catch( java.lang.ArrayIndexOutOfBoundsException aio)
              System.out.println("npe error" + aio);
           return proj;
       public void persistProject(Project proj) throws Exception
           dbConn.dbConnection();
           java.sql.PreparedStatement insertProjects;
           //String insertProjectString = "INSERT into IDAHO_PROJECTS(PROJECT_ID,PROJECT_TITLE) values (?,?)";
           String insertProjectString = "INSERT into IDAHO_PROJECTS(PROJECT_ID,PROJECT_TITLE) values (?,?)";
           insertProjects = dbConn.prepareStatement(insertProjectString);
           insertProjects.setInt(1, proj.getProjectId());
           insertProjects.setString(2, proj.getProjectTitle());
           insertProjects.execute();
           java.sql.PreparedStatement insertInvestigators;
           String insertInvestigatorString = "INSERT into IDAHO_INVESTIGATORS(PROJECT_ID, INVESTIGATOR,INVESTIGATOR_TITLE,DEPARTMENT, INSTITUTION,INSTITUTION_TYPE,INSTITUTION_URL,PHONE,EMAIL) values (?,?,?,?,?,?,?,?,?)";
           insertInvestigators = dbConn.prepareStatement(insertInvestigatorString);         
           insertInvestigators.setInt(1, proj.getProjectId());
           insertInvestigators.setString(2, proj.getInvestigator());
           insertInvestigators.setString(3,proj.getInvestigatorTitle());
           //insertInvestigators.setString(3,proj.getInvestigatorType());
           insertInvestigators.setString(4, proj.getDepartment());
           insertInvestigators.setString(5, proj.getInstitution());
           insertInvestigators.setString(6, proj.getInstitutionType());
           insertInvestigators.setString(7, proj.getInstitutionURL());
           insertInvestigators.setString(8,proj.getInvestigatorPhone());
           insertInvestigators.setString(9,proj.getEmail());
           // insertInvestigators.setString(2,proj.getAddress1());
           // insertInvestigators.setString(2,proj.getAddress2());
           // insertInvestigators.setString(2,proj.getCity());
           // insertInvestigators.setString(2,proj.getState());
           // insertInvestigators.setString(2,proj.getZip());
           insertInvestigators.execute();   
           dbConn.close();
       public static void main(String[] args) throws Exception
           URLReader urlReader = new URLReader();
           java.util.Collection projectIds = urlReader.getProjectIDs();
           for(java.util.Iterator iter = projectIds.iterator();iter.hasNext();)
               Integer projectId = (Integer)iter.next();
               Project project = urlReader.createProject(projectId.intValue());
               //Contact contact = urlReader.parseConact(project.getConactId());
               urlReader.persistProject(project);                
           // do commit on idahoProjects table;
       private DBConnection dbConn = null;  

    ok, another question associate with this program. I have it running. and it get the most of the information that I need as long as its a one to one pass. in iterating through the project Id.s and inserting them. Here is my problem though. I have two tablesPROJECTS{
         PROJECT_ID             NUMBER(20)                 PK                         Null-N
         PROJECT_TITLE       VARCHAR(500)                                          Null -Y
    INVESTIGATORS{
         PROJECT_ID                   NUMBER(20)                                               Null-N
         INVESTIGATOR               VARCHAR(200)                                          Null-Y
         INVESTIGATOR_TITLE  VARCHAR(200)                                          Null-Y
         INVESTIGATOR_TYPE  VARCHAR(200)                                          Null-Y
         DEPARMENT                   VARCHAR(200)                                          Null-Y
         INSTITUTION                   VARCHAR(200)                                          Null-Y
         INVESTIGATOR_TYPE  VARCHAR(200)                                          Null-Y
         INVESTIGATOR_URL    VARCHAR(200)                                          Null-Y
         PHONE                              VARCHAR(200)                                          Null-Y
         EMAIL                                VARCHAR(200)                                          Null-Y
         ADDRESS1                      VARCHAR(200)                                          Null-Y
         ADDRESs2                      VARCHAR(200)                                          Null-Y
         CITY                                  VARCHAR(200)                                          Null-Y
         STATE                              VARCHAR(200)                                          Null-Y
         ZIP                                     VARCHAR(200)                                          Null-Y
    }So I need to make sure in the table PROJECTS, that I have one project ID, which I think I do?
    But, in the second Table INVESTIGATORS, I can have many investigators associated with the same projectID. So I would like to insert into the second table, I think I can extract the data that I need for each investigator, but how do I iterate through them and put one into PROJECTS and many into INVESTIGATORS?
    so it would look something like this
    PROJECT_ID, INVESTIGATOR, INVESTIGATOR_TITLE, INVESTIGATOR_TYPE, etc...
    54122 , Dr. Who, Professor, LEAD PI, etc..
    54122, Dr. What, student, CO-PI, etc..
    If this is confusing please look at the code the first post with all of the code.
    orozcom

  • How to make a method run 25 times in 1 second?

    I have a JPanel that implements Runnable and that has animation on it. I need to update the screen 25 times per second. I have a vague idea that I need to call function run() 25 times a second, but how do I do that? Thank you!!!

    Hi how are you ?
    I noticed that you have some duke dollars for this questions:)
    Here is the answer.
    You won't want to call the run method 25 times by the way. Within your run method you can call a method that is going to do the animation 25 times .
    Example:
    void doAnimation(Graphics g){
    for(int i = 0 ; i < 25 ; i++){
    g.drawImage(yourimages,x,x);
    try{
    Thread.sleep(250);//or whatever the interval is
    }catch(InterruptedException e){}
    g.drawImage(clearscreenimage,x,x);
    let me know how that works for you ?
    however, the exact timing depends on the monitor being used and the OS being used. it's a bit more involved. but the answer above is a basic one.
    stephen

  • How to make list syncho synchronized

    i have a list objct and i want to save it in to database as object and want to retrive as object and reuse that object when i required . i am useing this code to save but it yhrow exception like java.io.NotSerializableException: manicdeals.site.mydetail.BasketItem where manicdeals.site.mydetail.BasketItem is my package structure
              public  void createCartHistory(String sessionId,String accountKey,List shoppingCart) throws SQLException, IOException, ClassNotFoundException
                        Connection connection=null;
                        PreparedStatement statement=null;
                        PreparedStatement statement2=null;
                        PreparedStatement statement3=null;
                        PreparedStatement statement4=null;
                        ResultSet rs=null;
                        ResultSet rs2=null;
                        Object obj = null;
                        //shoppingCart=new ArrayList();
                        //for(int i=0;i<shoppingCart.size();i++)
                        //     System.out.println(""+shoppingCart.get(i));
                     // List listArr = Collections.synchronizedList(new ArrayList(shoppingCart));
                        try
                        connection=DBConnect.getConnection();
                        String sql = "insert into shoppingcarthistory(sessionid,accountkey,cartobject)values(?,?,?)";
                        String sqlSelect="select sessionid,accountkey from shoppingcarthistory where sessionid='"+sessionId+"' or accountkey='"+accountKey+"'";
                        //System.out.println("sqlSelect"+sqlSelect);
                        String sqlDelete="delete  from shoppingcarthistory where sessionid='"+sessionId+"'";
                        //System.out.println("sqlDelete"+sqlDelete);
                       connection.setAutoCommit(false);
                        //check for record exist or not
                        statement2=connection.prepareStatement(sqlSelect);
                        rs=statement2.executeQuery();
                        boolean recordExist=false;
                        if(rs.next())
                             recordExist=true;
                        //System.out.println("after select"+recordExist);
                        // end for check record exist
                        // if exist delete
                        // delete if record exist with same session id and accountkey
                        statement3=connection.prepareStatement(sqlDelete);
                        if(recordExist)
                             statement3.executeUpdate();
                        //System.out.println("else for insert");
                        statement=connection.prepareStatement(sql);
                        // convert object to bytes to insert
                        byte[] bytes ;
                        System.out.println("1");
                        ByteArrayOutputStream out = new ByteArrayOutputStream() ;
                        System.out.println("2");
                        ObjectOutputStream objOut = new ObjectOutputStream(out) ;
                        System.out.println("3");
                        System.out.println("shoppingCart"+shoppingCart);
                        try{
                        objOut.writeObject(getSerializeObject(shoppingCart)) ;
                        //objOut.writeObject(shoppingCart) ;                    
                        }catch(Exception e){System.out.println(e);}
                        System.out.println("4");
                        objOut.flush() ;
                        bytes = out.toByteArray() ;
                        objOut.close() ;
                        // end convert object to bytes
                        statement.setString(1,sessionId);
                        statement.setString(2,accountKey);
                        statement.setBytes(3,bytes);
                        System.out.println(statement);
                        statement.executeUpdate();
                        connection.commit();
                        // reading cart object
                        }catch(Exception Ex)
                             ManicLogWriter.println("error in adding session history"+Ex.getMessage());
                        finally
                             DBConnect.closeRS(rs);
                             DBConnect.closeStmt(statement);
                             DBConnect.closeStmt(statement2);
                             DBConnect.closeStmt(statement3);
                             DBConnect.closeCon(connection);
              }createCartHistory method is to used for saving

    Collections.synchronizedList
    But this has nothing to do with the NotSerializable exception, which is probably thrown because it contains objects that don't implement Serializable.

  • How to make find methods return a subset of the result?

    Take the multipage apps for instance,
    it is a common idea to return only a subset(No. 10~No. 30) of the full-list especially when there are millions item in the full-list.
    Please help me:)

    Maybe you're looking for something like a "Value List Handler"
    http://developer.java.sun.com/developer/restricted/patterns/ValueListHandler.html

  • How to make a bootable backup of the operating system

    Hi,
    I am given the task to make a bootable backup of the OS (Solaris 9). I know I can use ufsdump to backup the system in single user mode. However, to make a backup bootable, shall I backup the file system to a DVD? Any advice will be greatly appreciated!
    Cinderella

    i call it cloning the disk . you can install boot block as mentioned in second solution of cloning disk
    e.g
    # /usr/sbin/installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c1t2d1s0
    ################## solution 1 ####################################
    dd if=/dev/rdsk/c0t1d0s2 of=/dev/rdsk/c0t4d0s2 bs=2048
    ############### solution 2 #####################3333
    Now this is through but if the disk are from the same vendor (I tested also
    dd on disks with different vendors and it function well) and if it the disk
    are the same size my opinion is to use the dd command because it is easier
    to be done. Anyway if the disk are not from the same size or vendor it could
    be done also with ufsdump and ufsrestore. Here how it works and what I did
    if your would like to clone a disk with ufsdump and ufsrestore:
    For testing we have two disks:
         c1t2d0     (Source Disk)
         c1t2d1     (Destination Disk)
    The source disk has the following layout (slice 4 and 5 are for Disksuite
    metadb's but are not initialized or configured):
         0 root wm 0 - 634 471.29MB (635/0/0)
    965200
         1 var wm 635 - 2014 1.00GB (1380/0/0)
    2097600
         2 backup wm 0 - 2732 1.98GB (2733/0/0)
    4154160
         3 swap wu 2015 - 2704 512.11MB (690/0/0)
    1048800
         4 unassigned wm 2705 - 2718 10.39MB (14/0/0)
    21280
         5 unassigned wm 2719 - 2732 10.39MB (14/0/0)
    21280
         6 unassigned wm 0 0 (0/0/0)
    0
         7 unassigned wm 0 0 (0/0/0)
    0
    On our testsystem the disk are the same size. Firstable the layout/label
    from the source disk must be copied to the destination disk because with
    ufsdump and ufsrestore this information will not be transfered to the
    destination disk because this commands are based on filesystem. This is also
    a difference between dd and ufsdump because dd copies also the information
    from labels and layouts because this command is based on blocks and not on
    filesystem. Here it is how it wors to copy the information from
    layout/label:
         # prtvtoc /dev/rdsk/c1t2d0s0 > /tmp/z
         # fmthard -s /tmp/z /dev/rdsk/c1t2d1s0
         fmthard: New volume table of contents now in place.
    The slice 0 from the destination disk has now the same layout like the
    source disk. This could be controlled with the command:
         # format
    To transfer the information from slice 0 source disk to the slice 0
    destination disk the destination disk must be prepared to work on it. It
    means at the moment there is no filesystem on this disk. To do this use the
    command newfs. No option are neccessary because for default the filesystem
    would be ufs. Only the raw device/slice must given to the command that newfs
    knows what exactly must be don:
         # newfs /dev/rdsk/c1t2d1s0
         newfs: /dev/rdsk/c1t2d1s0 last mounted as /
         newfs: construct a new file system /dev/rdsk/c1t2d1s0: (y/n)? Y
    Now we have a filesystem on slice 0 and we could mount the slice 0. This
    would be made with the command mount and option -F for filesystem = ufs and
    -o for read or write = rw and at least which slice = 0. At the end of the
    command is the device with the slice which must be mounted:
         # mount -F ufs -o rw /dev/dsk/c1t2d1s0 /mnt
    Now the device is mounted. With the following command ufsdump 0f = slice 0
    and / = partition the filesystem / would be dumped. The whole dump would be
    piped (I hope this is the correct english word) to the command ufsrestore
    which would be executed in the mounted directory ufsresore and extracts the
    dump.
         # ufsdump 0f - / | ( cd /mnt ;ufsrestore xvf - )
         Add links
         Set directory mode, owner, and times.
         set owner/mode for '.'? [yn] y
         Directories already exist, set modes anyway? [yn] y
         DUMP: 405886 blocks (198.19MB) on 1 volume at 406 KB/sec
         DUMP: DUMP IS DONE
    After given the command, the partition / from source disk and / from the
    destination disk looks based on files absolutly the same but there is a
    information which MUST be changed and it is the information in "/etc/vfstab"
    because on the destination disk in this file are the information from the
    source disk (it means source disk will be mounted on the device c1t2d0 and
    the destination diks on the device c1t2d1). This information must be changed
    in "/etc/vfstab" on the destination disk:
         # vi /mnt/etc/vfstab
         ---------- /mnt/etc/vfstab ----------
         #device device mount FS fsck
    mount mount
         #to mount to fsck point type pass at
    boot options
         #/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes
         fd - /dev/fd fd - no -
         /proc - /proc proc - no -
         /dev/dsk/c1t2d1s3 - - swap - no -
         /dev/dsk/c1t2d1s0 /dev/rdsk/c1t2d1s0 / ufs 1
    no
         /dev/dsk/c1t2d1s1 /dev/rdsk/c1t2d1s1 /var ufs 1
    no
         swap - /tmp tmpfs - yes -
         ---------- /mnt/etc/vfstab ----------
    Now we changed the information and the work is done on slice 0. We can now
    umount the slice 0:
         # umount /mnt
    Proceed with the other slice similar like explained before. In our example
    it would be:
         # newfs /dev/rdsk/c1t2d1s1
         newfs: /dev/rdsk/c1t2d1s1 last mounted as /var
         newfs: construct a new file system /dev/rdsk/c1t2d1s1: (y/n)? y
         # mount -F ufs -o rw /dev/dsk/c1t2d1s1 /mnt
         # ufsdump 1f - /var | ( cd /mnt ;ufsrestore xvf - )
         Set directory mode, owner, and times.
         set owner/mode for '.'? [yn] y
         Directories already exist, set modes anyway? [yn] y
         # umount /mnt
    Slice 4 and 5 are in our example not importante because this slice as
    explained are for Disksuite metadb's and on the source disk there are at the
    moment no information and no filesystem because Disksuite was not
    initialized or configured.
    It is a good idea to check the slices which where transfered files before.
    This could be done with the command fsck:
         # fsck /dev/rdsk/c1t0d1s0
         # fsck /dev/rdsk/c1t0d1s1
         # fsck /dev/rdsk/c1t0d1s2
         # fsck /dev/rdsk/c1t0d1s4
         # fsck /dev/rdsk/c1t0d1s5
    Now it seems that all what done but something is missing!? The destination
    disk looks now like the source disk with one exception; there is NO
    boot-block on the destination disk. If you don't create a boot-block the
    destination disk would never be bootable. To do this the system where it
    must be done must be from the same architecture like the source disk it
    means if the source disk is based on sun4m and you give now the command from
    a architecture like sun4u to the destination disk the boot-block would not
    work. This is what by me happens by the test (source disk based system on
    sun4m > to install boot-block I tried to give the command from sun4u based
    system and after I tried to boot the destination disk > result = destination
    disk was not able to boot). Ok we set now the command for boot-block to the
    destination disk to create there a boot-block:
         # /usr/sbin/installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk
         /dev/rdsk/c1t2d1s0
    Now you could boot the destination disk with the correct alias or the
    correct device alias. If you don't know what the alias is give on the system
    the following command:
         # ls -la /dev/dsk/c1t2d1s0
         /dev/dsk/c1t2d1s0 ->
    ../../devices/iommu at 0,10000000/sbus at 0,10001000/SUNW,soc@
    1,0/SUNW,pln at a0000000,753a58/ssd at 2,1:a
    End the OS with init 6 and stop the system reboot if the banner of OBP
    appears with stop + A. After that you are on the ok prompt. To set an alias
    give following command:
         # nvalias clone1 /iommu at 0,10000000/sbus@
         0,10001000/SUNW,soc@,0/SUNW,pln at a0000000,753a58/ssd at 2,1:a
    Use the alias with:
         ok boot clone1
    Have fun with you new clone...! I hope I did not forgett something but I
    tested it several times and it worked every time absolutly nice with no
    errors.

  • How to make it not show Finder window when system starts up?

    The subject is the question....a Finder window is always open when system first starts up and how do I make it show and not show? Thanks.

    someone else had this problem too, check out this thread
    http://discussions.apple.com/thread.jspa?threadID=1819909&tstart=150
    He fixed it by changing his wallpaper settings....(lol, copied and pasted from my post in another thread) might not be the same fix as what you need, but heck, why not try, right?

  • Z87-GD65 - how to make E2200 network port active in S5 system power state?

    My question is how do I make the E2200 network port active in the S5 system power state on the MSI Z87-GD65 motherboard?
    I require Wake on LAN (magic packet) for my computer but after shutdown the network port is inactive hence the WOL packet can not wake the computer. I have checked and activated the following items:
    On the motherboard
    - EuP 2013 = disabled
    - Resume by PCI-E device = enabled
    In Windows 8.1 E2200 network port settings
    - Wake on Magic Packet = enabled
    - Energy efficient network = disabled
    After I shutdown (power state S5) the network port activity lights go dark so I assume the port has shutdown as well. On my previous Gigabyte motherboard the network port stayed active allowing WOL packets to be transmitted to turn on the pc. Have I missed a setting on this new motherboard? My workmate also bought the same motherboard and has the same issue.

    Success!   
    MSI support responded and listed the correct settings and it is working!
    So the correct settings are:
    In the motherboard BIOS:
    - LAN Option ROM = Enabled
    - EuP 2013 = Disabled
    - Resume by PCI-E device = Enabled
    In Windows 8.1 E2200 network port settings:
    Under Power Management:
    - Allow this device to wake the computer = ON
    - Only allow a magic packet to wake the computer = ON
    Under Advanced:
    - Energy Efficient Ethernet = Disabled
    - Shutdown Wake Up = Enabled
    - Wake on Magic Packet = Enabled
    All working fine now. All I was missing was the "Shutdown Wake Up" setting. I hope this helps anyone else who has this excellent motherboard.

Maybe you are looking for

  • Sound on X-Fi dies after headphones plugged

    I am running Vista and have the X-Fi sound card. I have downloaded the latest drivers for Vista. What I notice is this:?After every few days of having no problems, all of a sudden, when I plug in my headphones into the jack on the front of my new Del

  • HDMI Splitter Issues

    I"m using an HDMI splitter with my Apple TV. Bascially I've run out if inputs and this little device, I think made by Belkin enables me to share Apple TV and DirectTV with one HDMI Input. All content plays fine from Apple TV with the exception of Ren

  • Firewire? 800 to 400?

    I bought a iMac several weeks ago and I want to transfer data from my Macbook to the iMac, do I need the 9 pin to 4 pin cable? I just want to make sure I purchase correct cable. Thanks Christopher Message was edited by: iCrizzo

  • Moving a file

    If I have a file in one directory, say c:\temp. I import the file into itunes and then move it to another directory, say "My Music"...will I have to re-import the file into itunes?

  • Leaving mapped idoc segments out of plain text output

    Hello all, I mapped a customer IDoc with one header and detail lines to a message maping with one header and detail lines. The value's in the header are used for variable substitution for the file name. The has to be writen as csv to a ftp server. I